From 694e07d193e7c5758a7d672b45668651b034003d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 31 May 2015 00:19:18 +0300 Subject: Convert InputAction enum into strong typed enum. --- src/events/keyevent.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/events/keyevent.h') 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 -- cgit v1.2.3-70-g09d2