summaryrefslogtreecommitdiff
path: root/src/touchactions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-03 00:00:28 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-03 00:00:28 +0300
commite9301ddce5a6ddf77dafc1f56f0b1461b2092c6f (patch)
treec9a1ed0ef0d9b15a1b3d617f9a17999bed768ff7 /src/touchactions.cpp
parent0b228c1ed05177a761dce44df31f087c0313dc64 (diff)
downloadplus-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.tar.gz
plus-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.tar.bz2
plus-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.tar.xz
plus-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.zip
Add support for relative mouse move in android version.
Diffstat (limited to 'src/touchactions.cpp')
-rw-r--r--src/touchactions.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/touchactions.cpp b/src/touchactions.cpp
index 20d008eda..40f7e5641 100644
--- a/src/touchactions.cpp
+++ b/src/touchactions.cpp
@@ -24,6 +24,7 @@
#include "game.h"
#include "keydata.h"
#include "logger.h"
+#include "mouseinput.h"
#include "touchmanager.h"
#ifdef ANDROID
@@ -35,12 +36,12 @@
bool padClicked(false);
#ifdef ANDROID
-void showKeyboard(const gcn::MouseInput &mouseInput)
+void showKeyboard(const MouseInput &mouseInput)
{
SDL_ANDROID_ToggleScreenKeyboardTextInput(nullptr);
}
#else
-void showKeyboard(const gcn::MouseInput &mouseInput A_UNUSED)
+void showKeyboard(const MouseInput &mouseInput A_UNUSED)
{
}
#endif
@@ -111,13 +112,13 @@ static void moveChar(int x, int y)
}
}
-void padClick(const gcn::MouseInput &mouseInput)
+void padClick(const MouseInput &mouseInput)
{
moveChar(mouseInput.getX(), mouseInput.getY());
padClicked = true;
}
-void padEvents(const gcn::MouseInput &mouseInput)
+void padEvents(const MouseInput &mouseInput)
{
if (mouseInput.getType() == gcn::MouseInput::MOVED)
{
@@ -126,13 +127,13 @@ void padEvents(const gcn::MouseInput &mouseInput)
}
}
-void padOut(const gcn::MouseInput &mouseInput A_UNUSED)
+void padOut(const MouseInput &mouseInput A_UNUSED)
{
padClicked = false;
moveChar(50, 50);
}
-void padUp(const gcn::MouseInput &mouseInput A_UNUSED)
+void padUp(const MouseInput &mouseInput A_UNUSED)
{
padClicked = false;
moveChar(50, 50);