diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-12-22 23:16:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-12-22 23:16:11 +0300 |
commit | 86487ca386118d3a06c029c00ad7f75767c3c719 (patch) | |
tree | 101db831af413ef0f1c14d453c668bb4305650ed /src/gui/windows | |
parent | 854fff82b8aa33f739c5e3d3f54c5fedb78b0e23 (diff) | |
download | plus-86487ca386118d3a06c029c00ad7f75767c3c719.tar.gz plus-86487ca386118d3a06c029c00ad7f75767c3c719.tar.bz2 plus-86487ca386118d3a06c029c00ad7f75767c3c719.tar.xz plus-86487ca386118d3a06c029c00ad7f75767c3c719.zip |
Remove default parameters from statuswindow.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 36 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.h | 13 |
3 files changed, 35 insertions, 17 deletions
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index e596f1fae..ebc7edd8e 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -120,14 +120,19 @@ MiniStatusWindow::MiniStatusWindow() : mIconSpacing(mSkin != nullptr ? mSkin->getOption("iconSpacing", 2) : 2), mMaxX(0) { - StatusWindow::updateHPBar(mHpBar); + StatusWindow::updateHPBar(mHpBar, + false); if (statusWindow != nullptr) - statusWindow->updateMPBar(mMpBar); + { + statusWindow->updateMPBar(mMpBar, + false); + } const bool job = serverConfig.getValueBool("showJob", true); - StatusWindow::updateXPBar(mXpBar); + StatusWindow::updateXPBar(mXpBar, + true); if (job) { @@ -137,7 +142,8 @@ MiniStatusWindow::MiniStatusWindow() : "jobprogressbar.xml", "jobprogressbar_fill.xml", // TRANSLATORS: status bar name "job bar", _("job bar")); - StatusWindow::updateJobBar(mJobBar); + StatusWindow::updateJobBar(mJobBar, + true); } loadBars(); @@ -263,8 +269,12 @@ void MiniStatusWindow::statChanged(const AttributesT id A_UNUSED, const int oldVal2 A_UNUSED) { if (statusWindow != nullptr) - statusWindow->updateMPBar(mMpBar); - StatusWindow::updateJobBar(mJobBar); + { + statusWindow->updateMPBar(mMpBar, + false); + } + StatusWindow::updateJobBar(mJobBar, + true); } void MiniStatusWindow::attributeChanged(const AttributesT id, @@ -277,15 +287,18 @@ void MiniStatusWindow::attributeChanged(const AttributesT id, { case Attributes::PLAYER_HP: case Attributes::PLAYER_MAX_HP: - StatusWindow::updateHPBar(mHpBar); + StatusWindow::updateHPBar(mHpBar, + false); break; case Attributes::PLAYER_MP: case Attributes::PLAYER_MAX_MP: - statusWindow->updateMPBar(mMpBar); + statusWindow->updateMPBar(mMpBar, + false); break; case Attributes::PLAYER_EXP: case Attributes::PLAYER_EXP_NEEDED: - StatusWindow::updateXPBar(mXpBar); + StatusWindow::updateXPBar(mXpBar, + true); break; case Attributes::TOTAL_WEIGHT: case Attributes::MAX_WEIGHT: @@ -303,7 +316,10 @@ void MiniStatusWindow::attributeChanged(const AttributesT id, void MiniStatusWindow::updateStatus() { if (statusWindow != nullptr) - statusWindow->updateStatusBar(mStatusBar); + { + statusWindow->updateStatusBar(mStatusBar, + true); + } if ((mStatusPopup != nullptr) && mStatusPopup->isPopupVisible()) mStatusPopup->update(); } diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index deddf397e..b4d096db4 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -489,7 +489,8 @@ void StatusWindow::updateXPBar(ProgressBar *const bar, const bool percent) percent); } -void StatusWindow::updateJobBar(ProgressBar *const bar, const bool percent) +void StatusWindow::updateJobBar(ProgressBar *const bar, + const bool percent) { if (bar == nullptr) return; diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h index 233840d17..c3567deca 100644 --- a/src/gui/windows/statuswindow.h +++ b/src/gui/windows/statuswindow.h @@ -58,25 +58,26 @@ class StatusWindow final : public Window, const int needed); static void updateHPBar(ProgressBar *const bar, - const bool showMax = false); - void updateMPBar(ProgressBar *bar, const bool showMax = false) const; + const bool showMax); + void updateMPBar(ProgressBar *bar, + const bool showMax) const; static void updateJobBar(ProgressBar *const bar, - const bool percent = true); + const bool percent); static void updateXPBar(ProgressBar *const bar, - const bool percent = true); + const bool percent); static void updateWeightBar(ProgressBar *const bar); static void updateInvSlotsBar(ProgressBar *const bar); static void updateMoneyBar(ProgressBar *const bar); static void updateArrowsBar(ProgressBar *const bar); void updateStatusBar(ProgressBar *const bar, - const bool percent = true) const; + const bool percent) const; static void updateProgressBar(ProgressBar *const bar, const int64_t value, const int64_t max, const bool percent); static void updateProgressBar(ProgressBar *const bar, const AttributesT id, - const bool percent = true); + const bool percent); void action(const ActionEvent &event) override; |