summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/npc_text.cpp1
-rw-r--r--src/gui/npcintegerdialog.cpp5
-rw-r--r--src/gui/npcintegerdialog.h5
-rw-r--r--src/gui/npclistdialog.cpp1
4 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp
index 0b7592c7..c28f1403 100644
--- a/src/gui/npc_text.cpp
+++ b/src/gui/npc_text.cpp
@@ -75,6 +75,7 @@ void NpcTextDialog::addText(const std::string &text)
void NpcTextDialog::clearText()
{
+ NPC::mTalking = false;
setText("");
}
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp
index d0a7c7be..9c49a630 100644
--- a/src/gui/npcintegerdialog.cpp
+++ b/src/gui/npcintegerdialog.cpp
@@ -70,6 +70,11 @@ int NpcIntegerDialog::getValue()
return mValueField->getValue();
}
+void NpcIntegerDialog::reset()
+{
+ mValueField->reset();
+}
+
void NpcIntegerDialog::action(const gcn::ActionEvent &event)
{
bool finish = false;
diff --git a/src/gui/npcintegerdialog.h b/src/gui/npcintegerdialog.h
index a4ca33cf..cca8cb32 100644
--- a/src/gui/npcintegerdialog.h
+++ b/src/gui/npcintegerdialog.h
@@ -55,6 +55,11 @@ class NpcIntegerDialog : public Window, public gcn::ActionListener
int getValue();
/**
+ * Resets the integer input field.
+ */
+ void reset();
+
+ /**
* Prepares the NPC dialog.
*
* @param min The minimum value to allow
diff --git a/src/gui/npclistdialog.cpp b/src/gui/npclistdialog.cpp
index f3bb949a..2c4dfc04 100644
--- a/src/gui/npclistdialog.cpp
+++ b/src/gui/npclistdialog.cpp
@@ -86,6 +86,7 @@ void NpcListDialog::parseItems(const std::string &itemString)
void NpcListDialog::reset()
{
+ mItemList->setSelected(-1);
mItems.clear();
}