diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-07-31 23:20:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-07-31 23:20:54 +0300 |
commit | 33ef923235aeabd07308816bb07ef790cc6c1024 (patch) | |
tree | e50c8bbefae98bc57e5b804ba145bca2005c5ca7 /src/gui/windowmenu.cpp | |
parent | b6bd4b5d68df33d12f18a67de2e54e016a0935fe (diff) | |
download | manaverse-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.cpp | 8 |
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); } } |