summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-13 17:20:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-13 17:20:01 +0300
commitb64a1f46b930516927b1290c1d6771b491b84958 (patch)
tree428493a138f0fdaebd4c915153f0dcdcbaedf76d
parentf1ed0094d84018cc85525bb4bcd96eb6de282680 (diff)
downloadmanaplus-b64a1f46b930516927b1290c1d6771b491b84958.tar.gz
manaplus-b64a1f46b930516927b1290c1d6771b491b84958.tar.bz2
manaplus-b64a1f46b930516927b1290c1d6771b491b84958.tar.xz
manaplus-b64a1f46b930516927b1290c1d6771b491b84958.zip
Fix mouse events on Android.v1.4.4.12
-rw-r--r--src/gui/viewport.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index e013171d3..46d47ab4a 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -276,6 +276,7 @@ void Viewport::logic()
void Viewport::followMouse()
{
+ return;
if (!gui)
return;
const uint8_t button = Gui::getMouseState(&mMouseX, &mMouseY);
@@ -667,7 +668,10 @@ void Viewport::walkByMouse(const MouseEvent &event)
void Viewport::mouseDragged(MouseEvent &event)
{
if (event.getSource() != this || event.isConsumed())
+ {
+ mPlayerFollowMouse = false;
return;
+ }
if (mMouseClicked)
{
if (abs(event.getX() - mMousePressX) > 32
@@ -879,6 +883,9 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED)
if (!mMap || !player_node || !actorManager)
return;
+ if (mMouseDirectionMove)
+ mPlayerFollowMouse = false;
+
const int x = mMouseX + mPixelViewX;
const int y = mMouseY + mPixelViewY;