summaryrefslogtreecommitdiff
path: root/src/gui/ministatus.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-10 03:38:34 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-10 03:38:34 +0200
commitc117ead1f66522c7b8cb29b4179a78e7dc775d28 (patch)
tree4152b3cb42b648c18f7b5fbf96565767109abd58 /src/gui/ministatus.cpp
parent61470cb03d26a9c6059c33b0f0e16125f5f6eae4 (diff)
downloadplus-c117ead1f66522c7b8cb29b4179a78e7dc775d28.tar.gz
plus-c117ead1f66522c7b8cb29b4179a78e7dc775d28.tar.bz2
plus-c117ead1f66522c7b8cb29b4179a78e7dc775d28.tar.xz
plus-c117ead1f66522c7b8cb29b4179a78e7dc775d28.zip
Add weight bar to top left corner (hidden by default).
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r--src/gui/ministatus.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp
index 5f385a46a..71e81abf8 100644
--- a/src/gui/ministatus.cpp
+++ b/src/gui/ministatus.cpp
@@ -84,6 +84,9 @@ MiniStatusWindow::MiniStatusWindow():
mJobBar = 0;
}
+ mWeightBar = createBar(0, 140, 20, Theme::PROG_WEIGHT,
+ "weight bar", _("weight bar"));
+
mStatusBar = createBar(100, 150, 20, Theme::PROG_EXP,
"status bar", _("status bar"));
@@ -199,6 +202,8 @@ void MiniStatusWindow::event(Channels channel _UNUSED_,
StatusWindow::updateMPBar(mMpBar);
else if (id == EXP || id == EXP_NEEDED)
StatusWindow::updateXPBar(mXpBar);
+ else if (id == TOTAL_WEIGHT || id == MAX_WEIGHT)
+ StatusWindow::updateWeightBar(mWeightBar, false);
}
else if (event.getName() == EVENT_UPDATESTAT)
{
@@ -344,7 +349,11 @@ void MiniStatusWindow::showBar(std::string name, bool isVisible)
void MiniStatusWindow::loadBars()
{
if (!config.getValue("ministatussaved", false))
+ {
+ if (mWeightBar)
+ mWeightBar->setVisible(false);
return;
+ }
for (int f = 0; f < 10; f ++)
{