summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-26 17:16:06 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-26 17:16:06 +0300
commit57253026ddfa8acdca3a6b8d82c9e803f35655ec (patch)
tree1f62b0b5a14c921f43e40b71a07eeab15ae4bb0d /src/gui/viewport.cpp
parenta859c1fa8c67dadb908e476803b128004b08db57 (diff)
downloadManaVerse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.tar.gz
ManaVerse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.tar.bz2
ManaVerse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.tar.xz
ManaVerse-57253026ddfa8acdca3a6b8d82c9e803f35655ec.zip
Not allow walking by mouse if npc dialog is opened.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 8d9e33ada..8f2940824 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -514,7 +514,6 @@ void Viewport::mousePressed(MouseEvent &event)
if (event.getSource() != this || event.isConsumed())
return;
- mMouseClicked = true;
// Check if we are alive and kickin'
if (!mMap || !localPlayer)
return;
@@ -522,7 +521,12 @@ void Viewport::mousePressed(MouseEvent &event)
// Check if we are busy
// if commented, allow context menu if npc dialog open
if (PlayerInfo::isTalking())
+ {
+ mMouseClicked = false;
return;
+ }
+
+ mMouseClicked = true;
mMousePressX = event.getX();
mMousePressY = event.getY();
@@ -753,9 +757,9 @@ void Viewport::mouseDragged(MouseEvent &event)
{
mPlayerFollowMouse = true;
}
- }
- walkByMouse(event);
+ walkByMouse(event);
+ }
}
void Viewport::mouseReleased(MouseEvent &event)