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/windows/ministatuswindow.cpp | |
parent | b6bd4b5d68df33d12f18a67de2e54e016a0935fe (diff) | |
download | mv-33ef923235aeabd07308816bb07ef790cc6c1024.tar.gz mv-33ef923235aeabd07308816bb07ef790cc6c1024.tar.bz2 mv-33ef923235aeabd07308816bb07ef790cc6c1024.tar.xz mv-33ef923235aeabd07308816bb07ef790cc6c1024.zip |
Move popup related code from viewport into popupManager.
Diffstat (limited to 'src/gui/windows/ministatuswindow.cpp')
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 61d3f4cab..6536617f3 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -30,8 +30,8 @@ #include "being/localplayer.h" #include "being/playerinfo.h" +#include "gui/popupmanager.h" #include "gui/skin.h" -#include "gui/viewport.h" #include "gui/popups/textpopup.h" @@ -443,9 +443,6 @@ void MiniStatusWindow::mouseMoved(MouseEvent &event) void MiniStatusWindow::mousePressed(MouseEvent &event) { - if (!viewport) - return; - if (event.getButton() == MouseButton::RIGHT) { const ProgressBar *const bar = dynamic_cast<ProgressBar*>( @@ -453,9 +450,9 @@ void MiniStatusWindow::mousePressed(MouseEvent &event) if (!bar) return; event.consume(); - if (viewport) + if (popupManager) { - viewport->showPopup(getX() + event.getX(), + popupManager->showPopup(getX() + event.getX(), getY() + event.getY(), bar); } } |