diff options
author | Falkreon <falkreon@gmail.com> | 2009-04-14 18:11:16 -0400 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-14 16:46:03 -0600 |
commit | 87d906c4f3529e7ce8f836876292efbfbe765990 (patch) | |
tree | 0536d5e0e2c8ea9937e51ed31ceef7cdb1ad8dd0 /src/gui/status.h | |
parent | 412a8fd2cff7f24729ab36bc6a59fd533b6d26c0 (diff) | |
download | mana-87d906c4f3529e7ce8f836876292efbfbe765990.tar.gz mana-87d906c4f3529e7ce8f836876292efbfbe765990.tar.bz2 mana-87d906c4f3529e7ce8f836876292efbfbe765990.tar.xz mana-87d906c4f3529e7ce8f836876292efbfbe765990.zip |
HP Bar Gradual Coloration
Makes HP Bars gradually fade from green to orange to red as HP goes down (or up). It looks pretty :)~
Diffstat (limited to 'src/gui/status.h')
-rw-r--r-- | src/gui/status.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/status.h b/src/gui/status.h index 403a7d59..78d35a32 100644 --- a/src/gui/status.h +++ b/src/gui/status.h @@ -62,6 +62,11 @@ class StatusWindow : public Window, public gcn::ActionListener static void updateXPBar(ProgressBar *bar, bool percent = true); static void updateJobBar(ProgressBar *bar, bool percent = true); + /** + * Used by updateHPBar to get the weighted average of two colors + */ + static float weightedAverage(float n1, float n2, float w); + private: LocalPlayer *mPlayer; |