summaryrefslogtreecommitdiff
path: root/src/gui/statuswindow.cpp
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-07-20 22:41:04 +0200
committerBertram <bertram@cegetel.net>2009-07-20 22:41:04 +0200
commit89dafda9453e178f90fbcc6ddab4ae9367cbfff1 (patch)
tree5e15c81ea14686c7110f959b881aa5b34ada343d /src/gui/statuswindow.cpp
parentddf75478b48173d82f455c99af3894bd0f9018ff (diff)
downloadmana-89dafda9453e178f90fbcc6ddab4ae9367cbfff1.tar.gz
mana-89dafda9453e178f90fbcc6ddab4ae9367cbfff1.tar.bz2
mana-89dafda9453e178f90fbcc6ddab4ae9367cbfff1.tar.xz
mana-89dafda9453e178f90fbcc6ddab4ae9367cbfff1.zip
Committed: 0000768: Progress bars smoothly scroll when the values have changed from last window open. The progress bars don't smoothly update the progress when the value is set at load time now. Only the ministatus and the status window are affected by this patch, as they are the onjly ones reported as flooding the gui.
Diffstat (limited to 'src/gui/statuswindow.cpp')
-rw-r--r--src/gui/statuswindow.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index 9e5bb3cd..76828e22 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -97,13 +97,19 @@ StatusWindow::StatusWindow():
mMoneyLabel = new Label("Money:");
mHpLabel = new Label("HP:");
- mHpBar = new ProgressBar(0.0f, 80, 15, gcn::Color(0, 171, 34));
+ mHpBar = new ProgressBar((float) player_node->getHp()
+ / (float) player_node->getMaxHp(),
+ 80, 15, gcn::Color(0, 171, 34));
mXpLabel = new Label(_("Exp:"));
- mXpBar = new ProgressBar(0.0f, 80, 15, gcn::Color(143, 192, 211));
+ mXpBar = new ProgressBar((float) player_node->getExp()
+ / player_node->getExpNeeded(),
+ 80, 15, gcn::Color(143, 192, 211));
mMpLabel = new Label(_("MP:"));
- mMpBar = new ProgressBar(0.0f, 80, 15, gcn::Color(26, 102, 230));
+ mMpBar = new ProgressBar((float) player_node->getMaxMP()
+ / (float) player_node->getMaxMP(),
+ 80, 15, gcn::Color(26, 102, 230));
place(0, 0, mLvlLabel, 3);
// 5, 0 Job Level