diff options
author | Ira Rice <irarice@gmail.com> | 2008-12-06 17:13:18 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-12-06 17:13:18 -0700 |
commit | 64fe627d25841d047c1c7da16a0740ab537973cb (patch) | |
tree | fa1700c315d7a7b58585ba8a8582d6e4bb6697da | |
parent | b03435fd4ad3c19b96dd7ae960e0950fdd35392c (diff) | |
download | mana-64fe627d25841d047c1c7da16a0740ab537973cb.tar.gz mana-64fe627d25841d047c1c7da16a0740ab537973cb.tar.bz2 mana-64fe627d25841d047c1c7da16a0740ab537973cb.tar.xz mana-64fe627d25841d047c1c7da16a0740ab537973cb.zip |
Fixed NPC dialogs so that they properly wrap. Broken by the last cherry
commit.
Signed-off-by: Ira Rice <irarice@gmail.com>
-rw-r--r-- | src/gui/npc_text.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp index a8edc1db..d83e9dea 100644 --- a/src/gui/npc_text.cpp +++ b/src/gui/npc_text.cpp @@ -57,7 +57,12 @@ NpcTextDialog::NpcTextDialog(): void NpcTextDialog::setText(const std::string &text) { + const gcn::Rectangle &area = getChildrenArea(); + const int width = area.width; + const int height = area.height; + mText = text; + mTextBox->setMinWidth(width - 30); mTextBox->setTextWrapped(mText); } |