From 95b4c6fb0698aa7af06035495aca008bcf342fc3 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Fri, 31 Oct 2008 22:49:49 +0000 Subject: 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. --- src/game.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game.cpp') 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 { -- cgit v1.2.3-70-g09d2