diff options
author | Falkreon <falkreon@gmail.com> | 2009-04-15 00:44:52 -0400 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-15 08:07:25 -0600 |
commit | 8606e95b5c8a5fadde99a253de91a661454460db (patch) | |
tree | b875f3ba1175db4b6400a20c2a31f502dd532168 /src/gui/palette.cpp | |
parent | 31f0b79de3e23f3660c35795232020870fb38590 (diff) | |
download | mana-8606e95b5c8a5fadde99a253de91a661454460db.tar.gz mana-8606e95b5c8a5fadde99a253de91a661454460db.tar.bz2 mana-8606e95b5c8a5fadde99a253de91a661454460db.tar.xz mana-8606e95b5c8a5fadde99a253de91a661454460db.zip |
HP Bar Gradual Changes Config (+ bugfixes)
* Setup menu now has settings for the HP bar colors.
* StatusWindow handles HP bar changes a little more consistently.
* Fixed a bug that cut weightedAverage values in half, making the
HP bar very dark.
Diffstat (limited to 'src/gui/palette.cpp')
-rw-r--r-- | src/gui/palette.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/palette.cpp b/src/gui/palette.cpp index 329a4a29..92a2aea5 100644 --- a/src/gui/palette.cpp +++ b/src/gui/palette.cpp @@ -133,6 +133,11 @@ Palette::Palette() : indent + _("Monster hits Player")); addColor(HIT_CRITICAL, 0xff0000, RAINBOW, indent + _("Critical Hit")); addColor(MISS, 0xffff00, STATIC, indent + _("Misses")); + + addColor(HPBAR_FULL, 0x99ff00, STATIC, _("HP Bar")); + addColor(HPBAR_THREE_QUARTERS, 0xffff00, STATIC, indent + _("3/4 HP Bar")); + addColor(HPBAR_ONE_HALF, 0xff9900, STATIC, indent + _("1/2 HP Bar")); + addColor(HPBAR_ONE_QUARTER, 0xff0000, PULSE, indent + _("1/4 HP Bar")); commit(true); } @@ -292,7 +297,7 @@ void Palette::advanceGradient () if (mGradVector[i]->grad == PULSE) { - colVal = (int) (255.0 * (sin(M_PI * + colVal = (int) (255.0 * (sin(M_PI * (mGradVector[i]->gradientIndex) / 255) + 1) / 2); const gcn::Color* col = &mGradVector[i]->testColor; |