diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-03 23:45:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-03 23:45:13 +0300 |
commit | 0282a499894b9ef5cde652dc06c8a073318ab93b (patch) | |
tree | 034aeb8c0d6f04083167cd3da4d8c3da2293b36a | |
parent | 20a530182719a356135ba91d1b453ae7fac500f4 (diff) | |
download | manaplus-0282a499894b9ef5cde652dc06c8a073318ab93b.tar.gz manaplus-0282a499894b9ef5cde652dc06c8a073318ab93b.tar.bz2 manaplus-0282a499894b9ef5cde652dc06c8a073318ab93b.tar.xz manaplus-0282a499894b9ef5cde652dc06c8a073318ab93b.zip |
fix type in touchactions.
-rw-r--r-- | src/touchactions.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/touchactions.cpp b/src/touchactions.cpp index f16a92e21..d969c8bc2 100644 --- a/src/touchactions.cpp +++ b/src/touchactions.cpp @@ -30,14 +30,14 @@ #include "debug.h" bool padClicked(false); -int haldJoyPad = 50; +int halfJoyPad = 50; #define impHandler(name) void name(const MouseInput &mouseInput) #define impHandler0(name) void name(const MouseInput &mouseInput A_UNUSED) void setHalfJoyPad(const int s) { - haldJoyPad = s; + halfJoyPad = s; } static void moveChar(int x, int y) @@ -46,8 +46,8 @@ static void moveChar(int x, int y) static const int diff = 20; // set center at (0,0) - x -= haldJoyPad; - y -= haldJoyPad; + x -= halfJoyPad; + y -= halfJoyPad; // some magic for checking at what sector was click if (abs(x) < lim1) @@ -104,7 +104,7 @@ static void moveChar(int x, int y) impHandler(padClick) { - moveChar(mouseInput.getX(), mouseInput.getY()); + moveChar(mouseInput.getTouchX(), mouseInput.getTouchY()); padClicked = true; } @@ -113,18 +113,18 @@ impHandler(padEvents) if (mouseInput.getType() == gcn::MouseInput::MOVED) { if (padClicked) - moveChar(mouseInput.getX(), mouseInput.getY()); + moveChar(mouseInput.getTouchX(), mouseInput.getTouchY()); } } impHandler0(padOut) { padClicked = false; - moveChar(haldJoyPad, haldJoyPad); + moveChar(halfJoyPad, halfJoyPad); } impHandler0(padUp) { padClicked = false; - moveChar(haldJoyPad, haldJoyPad); + moveChar(halfJoyPad, halfJoyPad); } |