diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-18 17:26:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-18 17:26:57 +0300 |
commit | efeb84b086052aeefd9d190a4a0676b8a81b651c (patch) | |
tree | 9643135eddf409c7dc8b0545046bc76a44521ec2 /src/input/keyboardconfig.cpp | |
parent | 8b94ceca60560fd06f60359492c47684eda57e5c (diff) | |
download | manaverse-efeb84b086052aeefd9d190a4a0676b8a81b651c.tar.gz manaverse-efeb84b086052aeefd9d190a4a0676b8a81b651c.tar.bz2 manaverse-efeb84b086052aeefd9d190a4a0676b8a81b651c.tar.xz manaverse-efeb84b086052aeefd9d190a4a0676b8a81b651c.zip |
Move inputtype into separate file.
Diffstat (limited to 'src/input/keyboardconfig.cpp')
-rw-r--r-- | src/input/keyboardconfig.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input/keyboardconfig.cpp b/src/input/keyboardconfig.cpp index 8f1df687f..58ef2007a 100644 --- a/src/input/keyboardconfig.cpp +++ b/src/input/keyboardconfig.cpp @@ -25,6 +25,7 @@ #include "configuration.h" #include "input/inputmanager.h" +#include "input/inputtype.h" #include "utils/gettext.h" @@ -75,7 +76,7 @@ int KeyboardConfig::getKeyValueFromEvent(const SDL_Event &event) int KeyboardConfig::getKeyIndex(const SDL_Event &event, const int grp) { const int keyValue = getKeyValueFromEvent(event); - return inputManager.getKeyIndex(keyValue, grp, INPUT_KEYBOARD); + return inputManager.getKeyIndex(keyValue, grp, InputType::KEYBOARD); } void KeyboardConfig::refreshActiveKeys() @@ -191,7 +192,7 @@ bool KeyboardConfig::isActionActive(const int index) const for (size_t i = 0; i < KeyFunctionSize; i ++) { const KeyItem &val = key.values[i]; - if (val.type != INPUT_KEYBOARD) + if (val.type != InputType::KEYBOARD) continue; const int value = val.value; @@ -212,7 +213,7 @@ bool KeyboardConfig::isActionActive(const int index) const void KeyboardConfig::update() { inputManager.updateKeyActionMap(mKeyToAction, mKeyToId, - mKeyTimeMap, INPUT_KEYBOARD); + mKeyTimeMap, InputType::KEYBOARD); } void KeyboardConfig::handleActicateKey(const SDL_Event &event) |