diff options
Diffstat (limited to 'src/gui/npc_text.cpp')
-rw-r--r-- | src/gui/npc_text.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp index 023307a7..fd02a14a 100644 --- a/src/gui/npc_text.cpp +++ b/src/gui/npc_text.cpp @@ -36,7 +36,7 @@ NpcTextDialog::NpcTextDialog(): Window(_("NPC")) { - mTextBox = new TextBox(); + mTextBox = new TextBox; mTextBox->setEditable(false); gcn::ScrollArea *scrollArea = new ScrollArea(mTextBox); Button *okButton = new Button(_("Ok"), "ok", this); @@ -57,15 +57,15 @@ NpcTextDialog::NpcTextDialog(): } void -NpcTextDialog::setText(const char *text) +NpcTextDialog::setText(const std::string &text) { - mTextBox->setText(text); + mTextBox->setTextWrapped(text); } void NpcTextDialog::addText(const std::string &text) { - mTextBox->setText(mTextBox->getText() + text + "\n"); + mTextBox->setTextWrapped(mTextBox->getText() + text + "\n"); } void |