diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-14 16:55:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-14 18:37:50 +0300 |
commit | 13642a6cddd8657ec84a2bfa94c6ac7d34545dba (patch) | |
tree | cefec154fe5b6ec59990c4ef5cfe67eba4a484e6 /src/inputmanager.cpp | |
parent | eaaafe3312a361e332d495ee68451e424d90a19d (diff) | |
download | manaplus-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.tar.gz manaplus-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.tar.bz2 manaplus-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.tar.xz manaplus-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.zip |
Add support for on screen joystick for moving.
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r-- | src/inputmanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp index 244f9a9dd..9cf456143 100644 --- a/src/inputmanager.cpp +++ b/src/inputmanager.cpp @@ -27,6 +27,7 @@ #include "keyboardconfig.h" #include "keyboarddata.h" #include "localplayer.h" +#include "touchmanager.h" #include "gui/chatwindow.h" #include "gui/gui.h" @@ -280,9 +281,9 @@ bool InputManager::isActionActive(const int index) const { if (keyboard.isActionActive(index)) return true; - if (joystick) - return joystick->isActionActive(index); - return false; + if (joystick && joystick->isActionActive(index)) + return true; + return touchManager.isActionActive(index); } KeyFunction &InputManager::getKey(int index) |