From 13642a6cddd8657ec84a2bfa94c6ac7d34545dba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 14 Nov 2012 16:55:35 +0300 Subject: Add support for on screen joystick for moving. --- src/inputmanager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/inputmanager.cpp') 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) -- cgit v1.2.3-70-g09d2