summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-25 00:50:33 -0700
committerIra Rice <irarice@gmail.com>2009-02-25 00:50:33 -0700
commitd8bc3a6418c5027d7f6c42ce8f8dceca8dee8971 (patch)
treefbb0b461bd151cbf3ad5aeedb80257140253f57c /src/net
parenta1e483913672e55704e8fbafeff5ea0ccc0c9b07 (diff)
downloadmana-d8bc3a6418c5027d7f6c42ce8f8dceca8dee8971.tar.gz
mana-d8bc3a6418c5027d7f6c42ce8f8dceca8dee8971.tar.bz2
mana-d8bc3a6418c5027d7f6c42ce8f8dceca8dee8971.tar.xz
mana-d8bc3a6418c5027d7f6c42ce8f8dceca8dee8971.zip
Fixed up NPC list dialogs to be navigatable by keyboard (scrolling
through the list requires the use of the mouse wheel at the moment), fixed wrapping behavior for wrapping around lists to actually wrap around lists properly, and placed a few checks for current_npc where they were assumed before which could cause the client to hang or crash in case the NPC is no longer around. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/npchandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 94e145b4..26250d9e 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -60,6 +60,7 @@ void NPCHandler::handleMessage(MessageIn *msg)
current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcListDialog->parseItems(msg->readString(msg->getLength() - 8));
npcListDialog->setVisible(true);
+ npcListDialog->requestFocus();
break;
case SMSG_NPC_MESSAGE:
@@ -68,7 +69,6 @@ void NPCHandler::handleMessage(MessageIn *msg)
player_node->setAction(LocalPlayer::STAND);
current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcTextDialog->addText(msg->readString(msg->getLength() - 8));
- npcListDialog->setVisible(false);
npcTextDialog->setVisible(true);
break;