diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-03 00:00:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-03 00:00:28 +0300 |
commit | e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f (patch) | |
tree | c9a1ed0ef0d9b15a1b3d617f9a17999bed768ff7 /src/touchactions.cpp | |
parent | 0b228c1ed05177a761dce44df31f087c0313dc64 (diff) | |
download | manaverse-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.tar.gz manaverse-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.tar.bz2 manaverse-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.tar.xz manaverse-e9301ddce5a6ddf77dafc1f56f0b1461b2092c6f.zip |
Add support for relative mouse move in android version.
Diffstat (limited to 'src/touchactions.cpp')
-rw-r--r-- | src/touchactions.cpp | 13 |
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); |