From 2af31544b36b803f066100780d9cfc1c2b5d543a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 18 Nov 2010 21:01:13 +0200 Subject: Allow enter OK button key in input field. By default OK shortcut is space key. Reviewed-by: Jaxad0127, Kage --- src/game.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 77544058..cd36dcdd 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -438,7 +438,8 @@ void Game::handleInput() && !gui->getFocusHandler()->getModalFocused()) { NpcDialog *dialog = NpcDialog::getActive(); - if (keyboard.isKeyActive(keyboard.KEY_OK)) + if (keyboard.isKeyActive(keyboard.KEY_OK) + && (!dialog || !dialog->isTextInputFocused())) { // Close the Browser if opened if (helpWindow->isVisible()) -- cgit v1.2.3-70-g09d2