summaryrefslogtreecommitdiff
path: root/src/joystick.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/joystick.h
parent0af9ff98876426c096d2b4b8a4f17172af92b8d0 (diff)
downloadmanaplus-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.tar.gz
manaplus-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.tar.bz2
manaplus-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.tar.xz
manaplus-aab80ddc8f56d6a383182ce5c241e9d94ca27bab.zip
Add ability to auto repeat some keys presses.
Diffstat (limited to 'src/joystick.h')
-rw-r--r--src/joystick.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/joystick.h b/src/joystick.h
index 39e96964f..f5495b83e 100644
--- a/src/joystick.h
+++ b/src/joystick.h
@@ -121,12 +121,18 @@ class Joystick
KeysVector *getActionVector(const SDL_Event &event);
+ KeysVector *getActionVectorByKey(int i);
+
int getButtonFromEvent(const SDL_Event &event) const;
bool isActionActive(int index) const;
bool validate() const;
+ void handleRepeat(int time);
+
+ void resetRepeat(int key);
+
protected:
unsigned char mDirection;
@@ -149,6 +155,8 @@ class Joystick
KeyToIdMap mKeyToId;
+ KeyTimeMap mKeyTimeMap;
+
/**
* Is joystick support enabled.
*/