From a154e6e99dfc72636770920f497d57c278b96996 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 11 Jan 2014 12:24:18 +0300 Subject: Block moving character by arrow keys in buy/sell dialogs. Check repeat keys for action condition. --- src/input/inputmanager.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/input/inputmanager.h') diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h index 1a65220c6..f781a3e09 100644 --- a/src/input/inputmanager.h +++ b/src/input/inputmanager.h @@ -84,10 +84,12 @@ enum KeyCondition // pressed COND_NOFOLLOW = 1024, // follow mode disabled COND_INGAME = 2048, // game must be started + COND_NOBUYSELL = 4096, // no active buy or sell dialogs COND_SHORTCUT = 2 + 4 + 16 + 512 + 2048, // flags for shortcut keys COND_SHORTCUT0 = 2 + 4 + 16 + 512, // flags for shortcut keys COND_GAME = 2 + 4 + 8 + 16 + 64 + 2048, // main game key - COND_GAME2 = 2 + 8 + 16 + 64 + 2048 + COND_GAME2 = 2 + 8 + 16 + 64 + 2048, + COND_ARROWKEYS = 2 + 8 + 16 + 64 + 2048 + 4096 }; class InputManager final @@ -130,7 +132,7 @@ class InputManager final void unassignKey(); - static bool isActionActive(const int index) A_WARN_UNUSED; + bool isActionActive(const int index) const A_WARN_UNUSED; /** * Set the index of the new key to be assigned. @@ -174,6 +176,8 @@ class InputManager final void executeAction(const int keyNum); protected: + bool isActionActive0(const int index) const A_WARN_UNUSED; + Setup_Input *mSetupInput; /**< Reference to setup window */ int mNewKeyIndex; /**< Index of new key to be assigned */ -- cgit v1.2.3-60-g2f50