summaryrefslogtreecommitdiff
path: root/src/input/keyinput.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-31 13:41:23 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-31 13:41:23 +0300
commitd593fa58e641aa90d7e1f0759299c59d2665cca6 (patch)
treebdbce97f8a9ad8fb1f80477ea603e0452daf4614 /src/input/keyinput.h
parent1072eecf0e9e9140796d24f82d077199b2a1d9e6 (diff)
downloadmv-d593fa58e641aa90d7e1f0759299c59d2665cca6.tar.gz
mv-d593fa58e641aa90d7e1f0759299c59d2665cca6.tar.bz2
mv-d593fa58e641aa90d7e1f0759299c59d2665cca6.tar.xz
mv-d593fa58e641aa90d7e1f0759299c59d2665cca6.zip
Move keyeventtype into separate file.
Diffstat (limited to 'src/input/keyinput.h')
-rw-r--r--src/input/keyinput.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/input/keyinput.h b/src/input/keyinput.h
index b7b7a7936..89a3b71d2 100644
--- a/src/input/keyinput.h
+++ b/src/input/keyinput.h
@@ -64,6 +64,8 @@
#ifndef INPUT_KEYINPUT_H
#define INPUT_KEYINPUT_H
+#include "events/keyeventtype.h"
+
#include "input/key.h"
#include <string>
@@ -75,7 +77,7 @@ class KeyInput final
public:
KeyInput() :
mKey(0),
- mType(0),
+ mType(KeyEventType::PRESSED),
#ifdef USE_SDL2
mText(),
#endif
@@ -85,22 +87,12 @@ class KeyInput final
~KeyInput()
{ }
- /**
- * Key input types. This enum corresponds to the enum with event
- * types on KeyEvent for easy mapping.
- */
- enum
- {
- PRESSED = 0,
- RELEASED
- };
-
- void setType(unsigned int type)
+ void setType(KeyEventType::Type type)
{
mType = type;
}
- int getType() const
+ KeyEventType::Type getType() const
{
return mType;
}
@@ -146,7 +138,7 @@ class KeyInput final
/**
* Holds the type of the key input.
*/
- unsigned int mType;
+ KeyEventType::Type mType;
#ifdef USE_SDL2
std::string mText;