summaryrefslogtreecommitdiff
path: root/src/gui/npc_text.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-24 23:03:31 -0700
committerIra Rice <irarice@gmail.com>2009-02-24 23:03:31 -0700
commita1e483913672e55704e8fbafeff5ea0ccc0c9b07 (patch)
tree47cd4487c4b3e14d3bbb1b94c25cef4c55b10ef3 /src/gui/npc_text.cpp
parente85269ffe1fe91f5cf44ccfec01252343643ef1d (diff)
downloadmana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.tar.gz
mana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.tar.bz2
mana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.tar.xz
mana-a1e483913672e55704e8fbafeff5ea0ccc0c9b07.zip
Cleaned up some code, as well as removed redundant talk client requesting
(which would happen from using the keyboard instead of the mouse). Signed-off-by: Ira Rice <irarice@gmail.com>
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)