Skip to content

Commit

Permalink
NWN: Make setText in NWNWidgetWithCaption only take a string parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
farmboy0 authored and DrMcCoy committed Dec 13, 2017
1 parent c00c059 commit 022e70f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/engines/nwn/gui/widgets/nwnwidgetwithcaption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ void NWNWidgetWithCaption::setColor(float r, float g, float b, float a) {
_caption->setColor(_r, _g, _b, _a);
}

void NWNWidgetWithCaption::setText(const Common::UString &text, float halign, float maxWidth, float maxHeight) {
void NWNWidgetWithCaption::setText(const Common::UString &text) {
if (!_caption)
return;

_caption->set(text, maxWidth, maxHeight);
_caption->setHorizontalAlign(halign);
_caption->setText(text);
}

const Common::UString NWNWidgetWithCaption::getText() const {
Expand Down
2 changes: 1 addition & 1 deletion src/engines/nwn/gui/widgets/nwnwidgetwithcaption.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class NWNWidgetWithCaption : public NWNWidget {

void setPosition(float x, float y, float z);
void setColor(float r, float g, float b, float a);
void setText(const Common::UString &text, float halign = Graphics::Aurora::kHAlignCenter, float maxWidth = 0.0f, float maxHeight = 0.0f);
void setText(const Common::UString &text);
const Common::UString getText() const;

float getWidth () const;
Expand Down

0 comments on commit 022e70f

Please sign in to comment.