summaryrefslogtreecommitdiff
path: root/src/keyboardconfig.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-05-09 21:16:31 +0300
committerAndrei Karas <akaras@inbox.ru>2012-05-09 21:17:31 +0300
commitaab80ddc8f56d6a383182ce5c241e9d94ca27bab (patch)
tree9e81b97354b666820ab6e2bb9575dc1127a486a8 /src/keyboardconfig.h
parent0af9ff98876426c096d2b4b8a4f17172af92b8d0 (diff)
downloadManaVerse-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.h8
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;