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.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp
index ed75b76e..0b7592c7 100644
--- a/src/gui/npc_text.cpp
+++ b/src/gui/npc_text.cpp
@@ -73,11 +73,16 @@ void NpcTextDialog::addText(const std::string &text)
setText(mText + text + "\n");
}
+void NpcTextDialog::clearText()
+{
+ setText("");
+}
+
void NpcTextDialog::action(const gcn::ActionEvent &event)
{
if (event.getId() == "ok")
{
- setText("");
+ clearText();
setVisible(false);
if (current_npc)