summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-02-16 14:22:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-02-16 15:19:51 +0300
commit8406b00588070266ae8af2bf25776f2fa716af69 (patch)
treef3515975feaf7dad0a7fa6ee33f6c88d1c6579b3 /src/gui/viewport.cpp
parentf880384018ee23efdc5cc072789e176208956a06 (diff)
downloadmv-8406b00588070266ae8af2bf25776f2fa716af69.tar.gz
mv-8406b00588070266ae8af2bf25776f2fa716af69.tar.bz2
mv-8406b00588070266ae8af2bf25776f2fa716af69.tar.xz
mv-8406b00588070266ae8af2bf25776f2fa716af69.zip
move mouseevent into events directory.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index b3cafa104..c3da988b7 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -280,13 +280,13 @@ void Viewport::_followMouse()
if (mPlayerFollowMouse && (button & SDL_BUTTON(1)))
{
// We create a mouse event and send it to mouseDragged.
- gcn::MouseEvent mouseEvent(nullptr,
+ MouseEvent mouseEvent(nullptr,
0,
false,
false,
false,
- gcn::MouseEvent::DRAGGED,
- gcn::MouseEvent::LEFT,
+ MouseEvent::DRAGGED,
+ MouseEvent::LEFT,
mMouseX,
mMouseY,
0);
@@ -385,7 +385,7 @@ void Viewport::_drawPath(Graphics *const graphics, const Path &path,
#endif
}
-void Viewport::mousePressed(gcn::MouseEvent &event)
+void Viewport::mousePressed(MouseEvent &event)
{
if (event.getSource() != this)
return;
@@ -406,7 +406,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
const int pixelY = eventY + mPixelViewY;
// Right click might open a popup
- if (eventButton == gcn::MouseEvent::RIGHT)
+ if (eventButton == MouseEvent::RIGHT)
{
mPlayerFollowMouse = false;
if (mHoverBeing)
@@ -460,7 +460,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
}
// Left click can cause different actions
- if (eventButton == gcn::MouseEvent::LEFT)
+ if (eventButton == MouseEvent::LEFT)
{
// Interact with some being
if (mHoverBeing)
@@ -532,7 +532,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
_followMouse();
}
}
- else if (eventButton == gcn::MouseEvent::MIDDLE)
+ else if (eventButton == MouseEvent::MIDDLE)
{
mPlayerFollowMouse = false;
validateSpeed();
@@ -548,7 +548,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
}
}
-void Viewport::mouseDragged(gcn::MouseEvent &event)
+void Viewport::mouseDragged(MouseEvent &event)
{
if (!mMap || !player_node)
return;
@@ -685,7 +685,7 @@ void Viewport::mouseDragged(gcn::MouseEvent &event)
}
}
-void Viewport::mouseReleased(gcn::MouseEvent &event A_UNUSED)
+void Viewport::mouseReleased(MouseEvent &event A_UNUSED)
{
mPlayerFollowMouse = false;
// Only useful for eAthena but doesn't hurt under ManaServ
@@ -838,7 +838,7 @@ void Viewport::optionChanged(const std::string &name)
mMouseDirectionMove = config.getBoolValue("mouseDirectionMove");
}
-void Viewport::mouseMoved(gcn::MouseEvent &event A_UNUSED)
+void Viewport::mouseMoved(MouseEvent &event A_UNUSED)
{
// Check if we are on the map
if (!mMap || !player_node || !actorManager)