summaryrefslogtreecommitdiff
path: root/src/events/keyevent.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-31 00:19:18 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-31 00:19:18 +0300
commit694e07d193e7c5758a7d672b45668651b034003d (patch)
tree20a4aec8dee2b3b5475db9f3667e797fb43c603b /src/events/keyevent.h
parentc9a84749b3b71d4df6cc3b9b488d60dc4a013a20 (diff)
downloadmanaplus-694e07d193e7c5758a7d672b45668651b034003d.tar.gz
manaplus-694e07d193e7c5758a7d672b45668651b034003d.tar.bz2
manaplus-694e07d193e7c5758a7d672b45668651b034003d.tar.xz
manaplus-694e07d193e7c5758a7d672b45668651b034003d.zip
Convert InputAction enum into strong typed enum.
Diffstat (limited to 'src/events/keyevent.h')
-rw-r--r--src/events/keyevent.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/events/keyevent.h b/src/events/keyevent.h
index 9f0a54972..d7b5b71b0 100644
--- a/src/events/keyevent.h
+++ b/src/events/keyevent.h
@@ -65,6 +65,9 @@
#define EVENTS_KEYEVENT_H
#include "enums/events/keyeventtype.h"
+
+#include "enums/input/inputaction.h"
+
#include "events/inputguievent.h"
#include "input/key.h"
@@ -89,7 +92,7 @@ class KeyEvent: public InputGuiEvent
*/
KeyEvent(Widget *const source,
KeyEventTypeT type,
- const int actionId,
+ const InputActionT actionId,
const Key &key) :
InputGuiEvent(source),
mKey(key),
@@ -122,7 +125,7 @@ class KeyEvent: public InputGuiEvent
const Key &getKey() const A_WARN_UNUSED
{ return mKey; }
- int getActionId() const A_WARN_UNUSED
+ InputActionT getActionId() const A_WARN_UNUSED
{ return mActionId; }
#ifdef USE_SDL2
@@ -148,7 +151,7 @@ class KeyEvent: public InputGuiEvent
*/
KeyEventTypeT mType;
- int mActionId;
+ InputActionT mActionId;
};
#endif // EVENTS_KEYEVENT_H