summaryrefslogtreecommitdiff
path: root/src/gui/ministatus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r--src/gui/ministatus.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp
index 8aaeb580..6d541474 100644
--- a/src/gui/ministatus.cpp
+++ b/src/gui/ministatus.cpp
@@ -36,10 +36,16 @@
MiniStatusWindow::MiniStatusWindow():
Popup("MiniStatus")
{
- mHpBar = new ProgressBar(0.0f, 100, 20, gcn::Color(0, 171, 34));
+ mHpBar = new ProgressBar((float) player_node->getHp()
+ / (float) player_node->getMaxHp(),
+ 100, 20, gcn::Color(0, 171, 34));
#ifdef EATHENA_SUPPORT
- mMpBar = new ProgressBar(0.0f, 100, 20, gcn::Color(26, 102, 230));
- mXpBar = new ProgressBar(0.0f, 100, 20, gcn::Color(143, 192, 211));
+ mMpBar = new ProgressBar((float) player_node->getMaxMP()
+ / (float) player_node->getMaxMP(),
+ 100, 20, gcn::Color(26, 102, 230));
+ mXpBar = new ProgressBar((float) player_node->getExp()
+ / player_node->getExpNeeded(),
+ 100, 20, gcn::Color(143, 192, 211));
#endif
mHpBar->setPosition(0, 3);