summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-31 22:31:22 +0000
committerIra Rice <irarice@gmail.com>2008-10-31 22:31:22 +0000
commit6937d802ec6a1976959bcdffdb0df462bf0d38ac (patch)
treee66101a6648ac8f896354de61550260f44aaa1e5 /src/game.cpp
parentb28c963a566f685f71c3c404099fe7c65bfa0a70 (diff)
downloadmana-6937d802ec6a1976959bcdffdb0df462bf0d38ac.tar.gz
mana-6937d802ec6a1976959bcdffdb0df462bf0d38ac.tar.bz2
mana-6937d802ec6a1976959bcdffdb0df462bf0d38ac.tar.xz
mana-6937d802ec6a1976959bcdffdb0df462bf0d38ac.zip
Improved keyboard support by putting the NPC ok button in focus, and
making it so that hitting enter on opening the dialog will close it.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 5299a1e5..18467b0b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -635,6 +635,10 @@ void Game::handleInput()
{
setupWindow->action(gcn::ActionEvent(NULL, "cancel"));
}
+ else if (npcTextDialog->isVisible())
+ {
+ npcTextDialog->action(gcn::ActionEvent(NULL, "ok"));
+ }
// Else, open the chat edit box
else
{