diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/ministatuswindow.cpp | 12 | ||||
-rw-r--r-- | src/gui/serverdialog.h | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp index 9f9f63a86..9f89ca97f 100644 --- a/src/gui/ministatuswindow.cpp +++ b/src/gui/ministatuswindow.cpp @@ -54,6 +54,10 @@ MiniStatusWindow::MiniStatusWindow() : Popup("MiniStatus", "ministatus.xml"), InventoryListener(), mHpBar(createBar(0, 100, 20, Theme::PROG_HP, "hp bar", _("health bar"))), + mMpBar(Net::getGameHandler()->canUseMagicBar() + ? createBar(0, 100, 20, Net::getPlayerHandler()->canUseMagic() + ? Theme::PROG_MP : Theme::PROG_NO_MP, "mp bar", _("mana bar")) + : nullptr), mXpBar(createBar(0, 100, 20, Theme::PROG_EXP, "xp bar", _("experience bar"))), mWeightBar(createBar(0, 140, 20, Theme::PROG_WEIGHT, @@ -74,15 +78,7 @@ MiniStatusWindow::MiniStatusWindow() : StatusWindow::updateHPBar(mHpBar); if (Net::getGameHandler()->canUseMagicBar()) - { - mMpBar = createBar(0, 100, 20, Net::getPlayerHandler()->canUseMagic() - ? Theme::PROG_MP : Theme::PROG_NO_MP, "mp bar", _("mana bar")); StatusWindow::updateMPBar(mMpBar); - } - else - { - mMpBar = nullptr; - } const int job = Net::getPlayerHandler()->getJobLocation() && serverConfig.getValueBool("showJob", false); diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h index 58d942434..741005a07 100644 --- a/src/gui/serverdialog.h +++ b/src/gui/serverdialog.h @@ -154,6 +154,7 @@ class ServerDialog : public Window, static int downloadUpdate(void *ptr, DownloadStatus status, size_t total, size_t remaining); + Mutex mMutex; Label *mDescription; Button *mQuitButton; Button *mConnectButton; @@ -184,7 +185,6 @@ class ServerDialog : public Window, Net::Download *mDownload; - Mutex mMutex; float mDownloadProgress; ServerInfo *mServerInfo; |