summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-04 22:13:12 -0700
committerIra Rice <irarice@gmail.com>2009-02-04 22:13:12 -0700
commitb0a8b8607962081e87716ab0dfbca2439953f420 (patch)
tree0cd03f7c948c5d5647351f78ed9b3a33628c8b72 /src/net
parent373f1aca8bb651332fec7031853d9a685ebc896e (diff)
downloadmana-client-b0a8b8607962081e87716ab0dfbca2439953f420.tar.gz
mana-client-b0a8b8607962081e87716ab0dfbca2439953f420.tar.bz2
mana-client-b0a8b8607962081e87716ab0dfbca2439953f420.tar.xz
mana-client-b0a8b8607962081e87716ab0dfbca2439953f420.zip
Modified the NPC string and integer classes to automatically take focus
to the input fields. Now the only NPC dialog which isn't completely navigatable by the keyboard alone is the NPC list dialog (seems to have regressed slightly recently). Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/npchandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/npchandler.cpp b/src/net/npchandler.cpp
index 82b07d41..4e17a27e 100644
--- a/src/net/npchandler.cpp
+++ b/src/net/npchandler.cpp
@@ -92,6 +92,7 @@ void NPCHandler::handleMessage(MessageIn *msg)
current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcIntegerDialog->setRange(0, 2147483647);
npcIntegerDialog->setVisible(true);
+ npcIntegerDialog->requestFocus();
break;
case SMSG_NPC_STR_INPUT:
@@ -100,6 +101,7 @@ void NPCHandler::handleMessage(MessageIn *msg)
current_npc = dynamic_cast<NPC*>(beingManager->findBeing(id));
npcStringDialog->setValue("");
npcStringDialog->setVisible(true);
+ npcStringDialog->requestFocus();
break;
}
}