summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2008-10-31 22:49:49 +0000
committerIra Rice <irarice@gmail.com>2008-10-31 22:49:49 +0000
commit95b4c6fb0698aa7af06035495aca008bcf342fc3 (patch)
tree427abff4d743fbef7ff35a8c1ff8907d0aba4022 /src/game.cpp
parent6937d802ec6a1976959bcdffdb0df462bf0d38ac (diff)
downloadmana-client-95b4c6fb0698aa7af06035495aca008bcf342fc3.tar.gz
mana-client-95b4c6fb0698aa7af06035495aca008bcf342fc3.tar.bz2
mana-client-95b4c6fb0698aa7af06035495aca008bcf342fc3.tar.xz
mana-client-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.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
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
{