diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-09 21:16:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-09 21:17:31 +0300 |
commit | aab80ddc8f56d6a383182ce5c241e9d94ca27bab (patch) | |
tree | 9e81b97354b666820ab6e2bb9575dc1127a486a8 /src/keyboardconfig.h | |
parent | 0af9ff98876426c096d2b4b8a4f17172af92b8d0 (diff) | |
download | manaverse-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.tar.gz manaverse-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.tar.bz2 manaverse-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.tar.xz manaverse-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.zip |
Add ability to auto repeat some keys presses.
Diffstat (limited to 'src/keyboardconfig.h')
-rw-r--r-- | src/keyboardconfig.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h index 88d525522..4fc1bdc51 100644 --- a/src/keyboardconfig.h +++ b/src/keyboardconfig.h @@ -75,6 +75,8 @@ class KeyboardConfig KeysVector *getActionVector(const SDL_Event &event); + KeysVector *getActionVectorByKey(int i); + std::string getKeyName(int key); bool isActionActive(int index) const; @@ -87,6 +89,10 @@ class KeyboardConfig int getActionId(const SDL_Event &event); + void handleRepeat(int time); + + void resetRepeat(int key); + private: bool mEnabled; /**< Flag to respond to key input */ @@ -97,6 +103,8 @@ class KeyboardConfig KeyToActionMap mKeyToAction; KeyToIdMap mKeyToId; + + KeyTimeMap mKeyTimeMap; }; extern KeyboardConfig keyboard; |