summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-02-29 22:44:19 +0300
committerAndrei Karas <akaras@inbox.ru>2012-02-29 22:44:19 +0300
commitb3f55809a8a56a5acf180371f05163091263cbda (patch)
treea76167c666e6085a281090bffd797883093adf1a /src/game.cpp
parentc53136fce2b1cca1bb9273255ad86f0aded747c2 (diff)
downloadmanaplus-b3f55809a8a56a5acf180371f05163091263cbda.tar.gz
manaplus-b3f55809a8a56a5acf180371f05163091263cbda.tar.bz2
manaplus-b3f55809a8a56a5acf180371f05163091263cbda.tar.xz
manaplus-b3f55809a8a56a5acf180371f05163091263cbda.zip
Fix npc menu focus/defocus issue.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
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();
+ }
}
}