summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-07 23:22:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-07 23:22:58 +0300
commitd030bf800fe7fa9b7bfdb1838ab9eb86c7f8da11 (patch)
tree4d60973c290c5aefdb1a1397cf6643ec0ba70f93
parentdfdd2555a2816af800c2e999bf45de9d8bd884a8 (diff)
downloadmanaplus-d030bf800fe7fa9b7bfdb1838ab9eb86c7f8da11.tar.gz
manaplus-d030bf800fe7fa9b7bfdb1838ab9eb86c7f8da11.tar.bz2
manaplus-d030bf800fe7fa9b7bfdb1838ab9eb86c7f8da11.tar.xz
manaplus-d030bf800fe7fa9b7bfdb1838ab9eb86c7f8da11.zip
Use better right click emulation in game.
-rw-r--r--src/actionmanager.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 27d4513ba..01137c2f6 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -34,6 +34,7 @@
#include "input/inputevent.h"
#include "input/inputmanager.h"
+#include "gui/sdlinput.h"
#include "gui/viewport.h"
#include "gui/windows/skilldialog.h"
@@ -195,16 +196,12 @@ impHandler(outfit)
impHandler0(mouseClick)
{
- if (!viewport)
+ if (!guiInput)
return false;
int mouseX, mouseY;
SDL_GetMouseState(&mouseX, &mouseY);
-
- gcn::MouseEvent event2(viewport, false, false, false, false,
- 0, gcn::MouseEvent::RIGHT, mouseX, mouseY, 1);
-
- viewport->mousePressed(event2);
+ guiInput->simulateMouseClick(mouseX, mouseY, gcn::MouseEvent::RIGHT);
return true;
}