summaryrefslogtreecommitdiff
path: root/src/gui/npcstringdialog.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-16 18:52:54 +0000
committerJared Adams <jaxad0127@gmail.com>2009-02-16 18:52:54 +0000
commit26a52e8f74306b6e13e7a2029c19d8c7e1efd23a (patch)
treee239a4842ba2dd02cbd9a50e5a040783b40e9ca7 /src/gui/npcstringdialog.cpp
parente1b66a9d88b43cee01ad15226c14fa6880fcbd04 (diff)
downloadmana-client-26a52e8f74306b6e13e7a2029c19d8c7e1efd23a.tar.gz
mana-client-26a52e8f74306b6e13e7a2029c19d8c7e1efd23a.tar.bz2
mana-client-26a52e8f74306b6e13e7a2029c19d8c7e1efd23a.tar.xz
mana-client-26a52e8f74306b6e13e7a2029c19d8c7e1efd23a.zip
Allow setting default values for NPC dialogs
Diffstat (limited to 'src/gui/npcstringdialog.cpp')
-rw-r--r--src/gui/npcstringdialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/npcstringdialog.cpp b/src/gui/npcstringdialog.cpp
index dc5893f8..f2ccc3cf 100644
--- a/src/gui/npcstringdialog.cpp
+++ b/src/gui/npcstringdialog.cpp
@@ -57,13 +57,14 @@ std::string NpcStringDialog::getValue()
void NpcStringDialog::setValue(const std::string &value)
{
mValueField->setText(value);
+ mDefault = value;
}
void NpcStringDialog::action(const gcn::ActionEvent &event)
{
if (event.getId() == "cancel")
{
- mValueField->setText("");
+ mValueField->setText(mDefault);
npcTextDialog->addText(_("\n> Cancel\n"));
}
else