summaryrefslogtreecommitdiff
path: root/src/actionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actionmanager.cpp')
-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;
}