diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-18 23:12:15 +0100 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-01-18 23:12:15 +0100 |
commit | a10cebb21bdd211716628039b406362f2168c852 (patch) | |
tree | f8776ca56b5972b1ae6bae31e84b12d37019d41a /src/net/npchandler.cpp | |
parent | f4abf6b94adf53db7a053f7c342cc79f69a03262 (diff) | |
parent | a2c136d3ae4f192f30ea229c4a313bc528e26c90 (diff) | |
download | mana-a10cebb21bdd211716628039b406362f2168c852.tar.gz mana-a10cebb21bdd211716628039b406362f2168c852.tar.bz2 mana-a10cebb21bdd211716628039b406362f2168c852.tar.xz mana-a10cebb21bdd211716628039b406362f2168c852.zip |
Merge branch 'master' of git@gitorious.org:tmw/eathena
Diffstat (limited to 'src/net/npchandler.cpp')
-rw-r--r-- | src/net/npchandler.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index b633835c..d8763f43 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -27,11 +27,15 @@ #include "../beingmanager.h" #include "../npc.h" +#include "../gui/npcintegerdialog.h" #include "../gui/npclistdialog.h" +#include "../gui/npcstringdialog.h" #include "../gui/npc_text.h" +extern NpcIntegerDialog *npcIntegerDialog; extern NpcListDialog *npcListDialog; extern NpcTextDialog *npcTextDialog; +extern NpcStringDialog *npcStringDialog; NPCHandler::NPCHandler() { @@ -40,6 +44,8 @@ NPCHandler::NPCHandler() SMSG_NPC_MESSAGE, SMSG_NPC_NEXT, SMSG_NPC_CLOSE, + SMSG_NPC_INT_INPUT, + SMSG_NPC_STR_INPUT, 0 }; handledMessages = _messages; @@ -78,5 +84,21 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_NEXT: // Next button in NPC dialog, currently unused break; + + case SMSG_NPC_INT_INPUT: + // Request for an integer + id = msg->readInt32(); + current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id)); + npcIntegerDialog->prepDialog(0, 0, 2147483647); + npcIntegerDialog->setVisible(true); + break; + + case SMSG_NPC_STR_INPUT: + // Request for a string + id = msg->readInt32(); + current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id)); + npcStringDialog->setValue(""); + npcStringDialog->setVisible(true); + break; } } |