summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
commit03c74387d37cefcc18e59db203d17d78cda40e8e (patch)
tree74e7291b97b67bb75984f5f5819944f058a9ace7 /src/gui/viewport.cpp
parent3d7cb45edeb4f75bad321d54d84fe2d13b487db9 (diff)
downloadmv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.gz
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.bz2
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.xz
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.zip
Move mousebutton into separate file.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 6b6850812..89bf2fcd2 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -290,7 +290,7 @@ void Viewport::followMouse()
// We create a mouse event and send it to mouseDragged.
MouseEvent event(nullptr,
MouseEventType::DRAGGED,
- MouseEvent::LEFT,
+ MouseButton::LEFT,
mMouseX,
mMouseY,
0);
@@ -508,7 +508,7 @@ void Viewport::mousePressed(MouseEvent &event)
const int pixelY = mMousePressY + mPixelViewY;
// Right click might open a popup
- if (eventButton == MouseEvent::RIGHT)
+ if (eventButton == MouseButton::RIGHT)
{
if (openContextMenu(event))
return;
@@ -523,7 +523,7 @@ void Viewport::mousePressed(MouseEvent &event)
}
// Left click can cause different actions
- if (!mLongMouseClick && eventButton == MouseEvent::LEFT)
+ if (!mLongMouseClick && eventButton == MouseButton::LEFT)
{
if (leftMouseAction())
{
@@ -531,7 +531,7 @@ void Viewport::mousePressed(MouseEvent &event)
return;
}
}
- else if (eventButton == MouseEvent::MIDDLE)
+ else if (eventButton == MouseButton::MIDDLE)
{
mPlayerFollowMouse = false;
validateSpeed();
@@ -701,7 +701,7 @@ void Viewport::mouseReleased(MouseEvent &event)
if (event.getSource() != this || event.isConsumed())
return;
const unsigned int eventButton = event.getButton();
- if (eventButton == MouseEvent::LEFT)
+ if (eventButton == MouseButton::LEFT)
{
// long button press
if (gui && gui->isLongPress())