From 7729faaadff2e6f92d24f43e52d085f4b11be315 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Fri, 10 Oct 2008 17:48:27 +0000 Subject: Did a little bit of code cleanup (mostly from TMW changes) as well as properly implemented line wrapping. Now, there are no more visual artifacts for speech boxes, and it always chooses the most optimal box size (which required that npc_text use it also. Do any other gui classes use the textbox class?). --- src/gui/npc_text.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/npc_text.cpp') diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp index 52f35a88..d51698fb 100644 --- a/src/gui/npc_text.cpp +++ b/src/gui/npc_text.cpp @@ -57,12 +57,14 @@ NpcTextDialog::NpcTextDialog(): void NpcTextDialog::setText(const std::string &text) { + mTextBox->setMinWidth(230); mTextBox->setTextWrapped(text); } void NpcTextDialog::addText(const std::string &text) { + mTextBox->setMinWidth(230); mTextBox->setTextWrapped(mTextBox->getText() + text + "\n"); } -- cgit v1.2.3-70-g09d2