summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-17 13:40:14 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-17 13:40:14 +0300
commit2cb9f5c3d47077a459fabf15800b1c45cfdacb3a (patch)
treead6eba1142495acd31dc8a50b56988a26350f2d5 /src/gui/viewport.cpp
parent829cd57e021ea85cffdbd3f3a7b18da835e00b7c (diff)
downloadplus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.tar.gz
plus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.tar.bz2
plus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.tar.xz
plus-2cb9f5c3d47077a459fabf15800b1c45cfdacb3a.zip
Remove proxy methods used for access popup menu.
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 7ae46dddf..761daf41f 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -45,6 +45,8 @@
#include "gui/fonts/font.h"
+#include "gui/popups/popupmenu.h"
+
#include "gui/windows/ministatuswindow.h"
#include "debug.h"
@@ -365,6 +367,8 @@ bool Viewport::openContextMenu(const MouseEvent &event)
mPlayerFollowMouse = false;
const int eventX = event.getX();
const int eventY = event.getY();
+ if (!popupMenu)
+ return false;
if (mHoverBeing)
{
validateSpeed();
@@ -375,29 +379,29 @@ bool Viewport::openContextMenu(const MouseEvent &event)
const int y = mMouseY + mPixelViewY;
actorManager->findBeingsByPixel(beings, x, y, true);
if (beings.size() > 1)
- popupManager->showPopup(eventX, eventY, beings);
+ popupMenu->showPopup(eventX, eventY, beings);
else
- popupManager->showPopup(eventX, eventY, mHoverBeing);
+ popupMenu->showPopup(eventX, eventY, mHoverBeing);
return true;
}
}
else if (mHoverItem)
{
validateSpeed();
- popupManager->showPopup(eventX, eventY, mHoverItem);
+ popupMenu->showPopup(eventX, eventY, mHoverItem);
return true;
}
else if (mHoverSign)
{
validateSpeed();
- popupManager->showPopup(eventX, eventY, mHoverSign);
+ popupMenu->showPopup(eventX, eventY, mHoverSign);
return true;
}
else if (settings.cameraMode)
{
if (!mMap)
return false;
- popupManager->showMapPopup(eventX, eventY,
+ popupMenu->showMapPopup(eventX, eventY,
(mMouseX + mPixelViewX) / mMap->getTileWidth(),
(mMouseY + mPixelViewY) / mMap->getTileHeight());
return true;