summaryrefslogtreecommitdiff
path: root/src/gui/ministatuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-14 21:13:38 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-14 21:13:38 +0300
commit6c3ab80385465cdaf88643fd964706827e2b61d6 (patch)
tree26cfa5f50e7712c078586efadb3281b207d40a5a /src/gui/ministatuswindow.cpp
parente74f40d96ed90750dd917d777a8621416084f019 (diff)
downloadmanaverse-6c3ab80385465cdaf88643fd964706827e2b61d6.tar.gz
manaverse-6c3ab80385465cdaf88643fd964706827e2b61d6.tar.bz2
manaverse-6c3ab80385465cdaf88643fd964706827e2b61d6.tar.xz
manaverse-6c3ab80385465cdaf88643fd964706827e2b61d6.zip
fix status icons draw if yellow bar is hidden.
Diffstat (limited to 'src/gui/ministatuswindow.cpp')
-rw-r--r--src/gui/ministatuswindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/ministatuswindow.cpp b/src/gui/ministatuswindow.cpp
index 4cdf64f33..f1421af3e 100644
--- a/src/gui/ministatuswindow.cpp
+++ b/src/gui/ministatuswindow.cpp
@@ -56,6 +56,7 @@ MiniStatusWindow::MiniStatusWindow() :
mSpacing(mSkin ? mSkin->getOption("spacing", 3) : 3),
mIconPadding(mSkin ? mSkin->getOption("iconPadding", 3) : 3),
mIconSpacing(mSkin ? mSkin->getOption("iconSpacing", 2) : 2),
+ mMaxX(0),
mHpBar(createBar(0, 100, 0, Theme::PROG_HP, "hp bar", _("health bar"))),
mMpBar(Net::getGameHandler()->canUseMagicBar()
? createBar(0, 100, 0, Net::getPlayerHandler()->canUseMagic()
@@ -177,6 +178,7 @@ void MiniStatusWindow::updateBars()
setContentSize(lastBar->getX() + lastBar->getWidth(),
lastBar->getY() + lastBar->getHeight());
}
+ mMaxX = x;
}
void MiniStatusWindow::setIcon(const int index, AnimatedSprite *const sprite)
@@ -201,7 +203,7 @@ void MiniStatusWindow::eraseIcon(const int index)
void MiniStatusWindow::drawIcons(Graphics *const graphics)
{
// Draw icons
- int icon_x = mStatusBar->getX() + mStatusBar->getWidth() + mIconPadding;
+ int icon_x = mMaxX + mIconPadding;
for (size_t i = 0, sz = mIcons.size(); i < sz; i ++)
{
if (mIcons[i])