From b3f55809a8a56a5acf180371f05163091263cbda Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Feb 2012 22:44:19 +0300 Subject: Fix npc menu focus/defocus issue. --- src/game.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/game.cpp') 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(); + } } } -- cgit v1.2.3-70-g09d2