summaryrefslogtreecommitdiff
path: root/src/gui/npc_text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/npc_text.cpp')
-rw-r--r--src/gui/npc_text.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp
index 2dd223bd..7b4fc634 100644
--- a/src/gui/npc_text.cpp
+++ b/src/gui/npc_text.cpp
@@ -34,7 +34,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);
@@ -55,15 +55,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