summaryrefslogtreecommitdiff
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-14 16:55:35 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-14 18:37:50 +0300
commit13642a6cddd8657ec84a2bfa94c6ac7d34545dba (patch)
treecefec154fe5b6ec59990c4ef5cfe67eba4a484e6 /src/inputmanager.cpp
parenteaaafe3312a361e332d495ee68451e424d90a19d (diff)
downloadmanaverse-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.tar.gz
manaverse-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.tar.bz2
manaverse-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.tar.xz
manaverse-13642a6cddd8657ec84a2bfa94c6ac7d34545dba.zip
Add support for on screen joystick for moving.
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r--src/inputmanager.cpp7
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)