summaryrefslogtreecommitdiff
path: root/src/gui/windowmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-31 23:20:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-31 23:20:54 +0300
commit33ef923235aeabd07308816bb07ef790cc6c1024 (patch)
treee50c8bbefae98bc57e5b804ba145bca2005c5ca7 /src/gui/windowmenu.cpp
parentb6bd4b5d68df33d12f18a67de2e54e016a0935fe (diff)
downloadmanaverse-33ef923235aeabd07308816bb07ef790cc6c1024.tar.gz
manaverse-33ef923235aeabd07308816bb07ef790cc6c1024.tar.bz2
manaverse-33ef923235aeabd07308816bb07ef790cc6c1024.tar.xz
manaverse-33ef923235aeabd07308816bb07ef790cc6c1024.zip
Move popup related code from viewport into popupManager.
Diffstat (limited to 'src/gui/windowmenu.cpp')
-rw-r--r--src/gui/windowmenu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windowmenu.cpp b/src/gui/windowmenu.cpp
index 35bd23ec7..ed3905404 100644
--- a/src/gui/windowmenu.cpp
+++ b/src/gui/windowmenu.cpp
@@ -28,8 +28,8 @@
#include "gui/buttoninfo.h"
#include "gui/buttontext.h"
+#include "gui/popupmanager.h"
#include "gui/skin.h"
-#include "gui/viewport.h"
#include "gui/popups/textpopup.h"
@@ -245,7 +245,7 @@ void WindowMenu::addButton(const char *const text,
void WindowMenu::mousePressed(MouseEvent &event)
{
- if (!viewport)
+ if (!popupManager)
return;
if (event.getButton() == MouseButton::RIGHT)
@@ -257,9 +257,9 @@ void WindowMenu::mousePressed(MouseEvent &event)
Button *const btn = dynamic_cast<Button*>(event.getSource());
if (!btn)
return;
- if (viewport)
+ if (popupManager)
{
- viewport->showPopup(getX() + event.getX(),
+ popupManager->showPopup(getX() + event.getX(),
getY() + event.getY(), btn);
}
}