diff options
author | Ira Rice <irarice@gmail.com> | 2008-10-31 22:49:49 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2008-10-31 22:49:49 +0000 |
commit | 95b4c6fb0698aa7af06035495aca008bcf342fc3 (patch) | |
tree | 427abff4d743fbef7ff35a8c1ff8907d0aba4022 | |
parent | 6937d802ec6a1976959bcdffdb0df462bf0d38ac (diff) | |
download | mana-95b4c6fb0698aa7af06035495aca008bcf342fc3.tar.gz mana-95b4c6fb0698aa7af06035495aca008bcf342fc3.tar.bz2 mana-95b4c6fb0698aa7af06035495aca008bcf342fc3.tar.xz mana-95b4c6fb0698aa7af06035495aca008bcf342fc3.zip |
Last commit was a bit premature (was trying to cancel the commit).
Anyways, this patch improves keyboard support for NPCs by allowing the
user to hit enter to proceed through the dialogs. What it doesn't do at
the moment is give users a way to scroll through the dialog choices...
yet. But once one is selected, you can hit enter to continue.
-rw-r--r-- | src/game.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp index 18467b0b..d7ce4314 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -635,10 +635,16 @@ void Game::handleInput() { setupWindow->action(gcn::ActionEvent(NULL, "cancel")); } + // Proceed to the next dialog option, or close the window else if (npcTextDialog->isVisible()) { npcTextDialog->action(gcn::ActionEvent(NULL, "ok")); } + // Choose the currently highlighted dialogue option + else if (npcListDialog->isVisible()) + { + npcListDialog->action(gcn::ActionEvent(NULL, "ok")); + } // Else, open the chat edit box else { |