diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-04-27 16:24:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-04-27 16:24:12 +0300 |
commit | a6f6dc9c2db87ed852cac1f8a3047f9b1d3efac0 (patch) | |
tree | bd1e6b6a1cdb42b5e6d4489158d438fe8c05f533 /src/gui/windows/ministatuswindow.cpp | |
parent | af0ae4d0b7c56d540639bb1f4ba7cc458ec718c1 (diff) | |
download | manaplus-a6f6dc9c2db87ed852cac1f8a3047f9b1d3efac0.tar.gz manaplus-a6f6dc9c2db87ed852cac1f8a3047f9b1d3efac0.tar.bz2 manaplus-a6f6dc9c2db87ed852cac1f8a3047f9b1d3efac0.tar.xz manaplus-a6f6dc9c2db87ed852cac1f8a3047f9b1d3efac0.zip |
Add StatListener.
Diffstat (limited to 'src/gui/windows/ministatuswindow.cpp')
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 6fb330bbf..2320ac08a 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -112,8 +112,6 @@ MiniStatusWindow::MiniStatusWindow() : mTextPopup->postInit(); mStatusPopup->postInit(); - listen(CHANNEL_ATTRIBUTES); - StatusWindow::updateHPBar(mHpBar); if (Net::getGameHandler()->canUseMagicBar() && statusWindow) @@ -251,14 +249,13 @@ void MiniStatusWindow::drawIcons(Graphics *const graphics) } } -void MiniStatusWindow::processEvent(const Channels channel A_UNUSED, - const DepricatedEvent &event) +void MiniStatusWindow::statChanged(const int id, + const int oldVal1 A_UNUSED, + const int oldVal2 A_UNUSED) { - if (event.getName() == EVENT_UPDATESTAT) - { + if (statusWindow) statusWindow->updateMPBar(mMpBar); - StatusWindow::updateJobBar(mJobBar); - } + StatusWindow::updateJobBar(mJobBar); } void MiniStatusWindow::attributeChanged(const int id, |