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