summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-08 00:34:31 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-08 00:34:31 +0300
commit4f3e6ddeae45b7b04b191533e8f6c456fbc207d8 (patch)
tree68096e884721900e1bc52ddf1496278ff474c4c5 /src
parent593cccb16074fe9269dd2f278bd79859769eb1fd (diff)
downloadplus-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.tar.gz
plus-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.tar.bz2
plus-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.tar.xz
plus-4f3e6ddeae45b7b04b191533e8f6c456fbc207d8.zip
Fix issues after last changes.
Diffstat (limited to 'src')
-rw-r--r--src/gui/ministatuswindow.cpp12
-rw-r--r--src/gui/serverdialog.h2
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;