diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-17 00:19:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-17 00:19:10 +0300 |
commit | 4825afb0187527d7eaa0ea3d903ad716a3eb9562 (patch) | |
tree | e516623a908eb6a8a4d053bbc39a36ff81aa4141 /src/input/inputmanager.h | |
parent | b3d17866a3c5700b52c2b0b954fce132a52c1dbf (diff) | |
download | mv-4825afb0187527d7eaa0ea3d903ad716a3eb9562.tar.gz mv-4825afb0187527d7eaa0ea3d903ad716a3eb9562.tar.bz2 mv-4825afb0187527d7eaa0ea3d903ad716a3eb9562.tar.xz mv-4825afb0187527d7eaa0ea3d903ad716a3eb9562.zip |
Convert enum InputType into strong typed.
Diffstat (limited to 'src/input/inputmanager.h')
-rw-r--r-- | src/input/inputmanager.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/input/inputmanager.h b/src/input/inputmanager.h index cc571c372..df759cacc 100644 --- a/src/input/inputmanager.h +++ b/src/input/inputmanager.h @@ -23,6 +23,8 @@ #include "input/inputfunction.h" +#include "enums/input/inputtype.h" + #include "events/inputevent.h" #include "utils/stringmap.h" @@ -77,10 +79,11 @@ class InputManager final std::string getKeyValueByNameLong(const std::string &keyName); void addActionKey(const InputActionT action, - const int type, + const InputTypeT type, const int val); - void setNewKey(const SDL_Event &event, const int type); + void setNewKey(const SDL_Event &event, + const InputTypeT type); void unassignKey(); @@ -106,12 +109,13 @@ class InputManager final void updateKeyActionMap(KeyToActionMap &actionMap, KeyToIdMap &idMap, KeyTimeMap &keyTimeMap, - const int type) const; + const InputType type) const; bool invokeKey(const InputActionData *const key, const InputActionT keyNum); - bool handleAssignKey(const SDL_Event &event, const int type); + bool handleAssignKey(const SDL_Event &event, + const InputTypeT type); static void handleRepeat(); @@ -119,7 +123,7 @@ class InputManager final InputActionT getKeyIndex(const int value, const int grp, - const int type) const A_WARN_UNUSED; + const InputTypeT type) const A_WARN_UNUSED; static void update(); |