summaryrefslogtreecommitdiff
path: root/src/gui/npc_text.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-16 08:39:59 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-04-16 08:39:59 +0000
commitfe02ca9dcaa593d361f0acebcfb514997dc4ca9e (patch)
tree3dccd5a76a231f2f7a6261732f144c70e850afb7 /src/gui/npc_text.cpp
parent2aae7dcba5b240674a76e0d85dbf64cede1d478b (diff)
downloadmana-fe02ca9dcaa593d361f0acebcfb514997dc4ca9e.tar.gz
mana-fe02ca9dcaa593d361f0acebcfb514997dc4ca9e.tar.bz2
mana-fe02ca9dcaa593d361f0acebcfb514997dc4ca9e.tar.xz
mana-fe02ca9dcaa593d361f0acebcfb514997dc4ca9e.zip
Restored the text wrapping in TextBox, since it was based on overriding a
method that is no longer virtual in Guichan 0.8.0 (gcn::TextBox::setText()).
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