diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-29 22:44:19 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-29 22:44:19 +0300 |
commit | b3f55809a8a56a5acf180371f05163091263cbda (patch) | |
tree | a76167c666e6085a281090bffd797883093adf1a /src/game.cpp | |
parent | c53136fce2b1cca1bb9273255ad86f0aded747c2 (diff) | |
download | mv-b3f55809a8a56a5acf180371f05163091263cbda.tar.gz mv-b3f55809a8a56a5acf180371f05163091263cbda.tar.bz2 mv-b3f55809a8a56a5acf180371f05163091263cbda.tar.xz mv-b3f55809a8a56a5acf180371f05163091263cbda.zip |
Fix npc menu focus/defocus issue.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp index ae8682972..a0c2a6151 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -803,12 +803,13 @@ bool Game::handleSwitchKeys(SDL_Event &event, bool &used) used = true; } } - if (dialog) + if (dialog && !dialog->isInputFocused()) { - if (keyboard.isActionActive(keyboard.KEY_MOVE_UP)) - dialog->move(1); - else if (keyboard.isActionActive(keyboard.KEY_MOVE_DOWN)) - dialog->move(-1); + if (keyboard.isActionActive(keyboard.KEY_MOVE_UP) + || keyboard.isActionActive(keyboard.KEY_MOVE_DOWN)) + { + dialog->refocus(); + } } } |