From 9dfc4ea2f30f43fb5ffd239b90b2a7259fbe0330 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Mon, 16 Feb 2009 14:41:24 +0000 Subject: 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). --- src/net/npchandler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/net') diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp index ea03537f..3080bcf8 100644 --- a/src/net/npchandler.cpp +++ b/src/net/npchandler.cpp @@ -78,12 +78,15 @@ void NPCHandler::handleMessage(MessageIn *msg) case SMSG_NPC_CLOSE: id = msg->readInt32(); - if (current_npc == dynamic_cast(beingManager->findBeing(id))) - current_npc = NULL; + current_npc = dynamic_cast(beingManager->findBeing(id)); + npcTextDialog->showCloseButton(); break; case SMSG_NPC_NEXT: // Next button in NPC dialog, currently unused + id = msg->readInt32(); + current_npc = dynamic_cast(beingManager->findBeing(id)); + npcTextDialog->showNextButton(); break; case SMSG_NPC_INT_INPUT: -- cgit v1.2.3-70-g09d2