summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-11-18 21:01:13 +0200
committerAndrei Karas <akaras@inbox.ru>2010-11-29 22:44:48 +0200
commit2af31544b36b803f066100780d9cfc1c2b5d543a (patch)
tree2830ab3d223df8f5787eb563ef03fee469f06601 /src/game.cpp
parent1f69108501c4bf51f3adac9ffbf7a7631fb12b9a (diff)
downloadmana-client-2af31544b36b803f066100780d9cfc1c2b5d543a.tar.gz
mana-client-2af31544b36b803f066100780d9cfc1c2b5d543a.tar.bz2
mana-client-2af31544b36b803f066100780d9cfc1c2b5d543a.tar.xz
mana-client-2af31544b36b803f066100780d9cfc1c2b5d543a.zip
Allow enter OK button key in input field.
By default OK shortcut is space key. Reviewed-by: Jaxad0127, Kage
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp3
1 files changed, 2 insertions, 1 deletions
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())