diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-27 19:37:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-27 19:37:59 +0300 |
commit | 03418ce78766b062ce5af7aaf99f7f2c62152b6b (patch) | |
tree | eb0127126e8d9506ca4aeee639c896bc561fa6ca /src/gui | |
parent | c77f06f7b80a67c842abe837beb2f22e9ecf60cc (diff) | |
download | plus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.tar.gz plus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.tar.bz2 plus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.tar.xz plus-03418ce78766b062ce5af7aaf99f7f2c62152b6b.zip |
Add UpdateStatusListener.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/viewport.cpp | 5 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.h | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index c7e2b31df..061b07adc 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -43,6 +43,8 @@ #include "gui/windows/ministatuswindow.h" +#include "listeners/updatestatuslistener.h" + #include "utils/delete2.h" #include "debug.h" @@ -997,8 +999,7 @@ void Viewport::toggleCameraMode() mCameraRelativeX = 0; mCameraRelativeY = 0; } - if (miniStatusWindow) - miniStatusWindow->updateStatus(); + UpdateStatusListener::distributeEvent(); } void Viewport::hideBeingPopup() diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 95948e776..720c1375c 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -58,6 +58,7 @@ MiniStatusWindow::MiniStatusWindow() : AttributeListener(), StatListener(), ArrowsListener(), + UpdateStatusListener(), mBars(), mBarNames(), mIcons(), diff --git a/src/gui/windows/ministatuswindow.h b/src/gui/windows/ministatuswindow.h index 3b7138a23..7c16bb132 100644 --- a/src/gui/windows/ministatuswindow.h +++ b/src/gui/windows/ministatuswindow.h @@ -28,6 +28,7 @@ #include "listeners/arrowslistener.h" #include "listeners/attributelistener.h" #include "listeners/statlistener.h" +#include "listeners/updatestatuslistener.h" #include "gui/widgets/window.h" @@ -48,7 +49,8 @@ class MiniStatusWindow final : public Window, public InventoryListener, public AttributeListener, public StatListener, - public ArrowsListener + public ArrowsListener, + public UpdateStatusListener { public: MiniStatusWindow(); |