summaryrefslogtreecommitdiff
path: root/src/gui/npcintegerdialog.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-16 14:41:24 +0000
committerJared Adams <jaxad0127@gmail.com>2009-02-16 14:43:19 +0000
commit9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330 (patch)
tree37b2da3fc74946fb180b8e60d6e32b1190775a3f /src/gui/npcintegerdialog.cpp
parenta1a5ebb9ef14e013ae63a71c2c28609f2a65cdaa (diff)
downloadmana-client-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.tar.gz
mana-client-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.tar.bz2
mana-client-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.tar.xz
mana-client-9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330.zip
Add next/close buttons for NPCs
And keep the text dialog open for the whole transaction, logging user input and keep a full record of text from the NPC (for the current transaction only).
Diffstat (limited to 'src/gui/npcintegerdialog.cpp')
-rw-r--r--src/gui/npcintegerdialog.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp
index 7e888d16..88d02311 100644
--- a/src/gui/npcintegerdialog.cpp
+++ b/src/gui/npcintegerdialog.cpp
@@ -21,6 +21,7 @@
#include "button.h"
#include "inttextfield.h"
+#include "npc_text.h"
#include "npcintegerdialog.h"
#include "widgets/layout.h"
@@ -28,6 +29,9 @@
#include "../npc.h"
#include "../utils/gettext.h"
+#include "../utils/strprintf.h"
+
+extern NpcTextDialog *npcTextDialog;
NpcIntegerDialog::NpcIntegerDialog():
Window(_("NPC Number Request"))
@@ -76,11 +80,13 @@ void NpcIntegerDialog::action(const gcn::ActionEvent &event)
if (event.getId() == "ok")
{
finish = 1;
+ npcTextDialog->addText(strprintf("\n> %d\n", value));
}
else if (event.getId() == "cancel")
{
finish = 1;
mValueField->reset();
+ npcTextDialog->addText(_("\n> Cancel\n"));
}
else if (event.getId() == "decvalue")
{
@@ -99,7 +105,6 @@ void NpcIntegerDialog::action(const gcn::ActionEvent &event)
{
setVisible(false);
current_npc->integerInput(mValueField->getValue());
- current_npc = 0;
mValueField->reset();
}
}