From 64fe627d25841d047c1c7da16a0740ab537973cb Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 6 Dec 2008 17:13:18 -0700 Subject: Fixed NPC dialogs so that they properly wrap. Broken by the last cherry commit. Signed-off-by: Ira Rice --- src/gui/npc_text.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); } -- cgit v1.2.3-70-g09d2