diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-01-22 13:31:13 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-01-22 13:31:13 +0000 |
commit | bd56bf8afdab16383ed8ad08412a8c807f84af85 (patch) | |
tree | 0e963ada63bcbe3c50dd77986aaa15b9ba49816a /src/gui/ministatus.cpp | |
parent | 5359640b6f271af31f6423df9d661433eff89a3e (diff) | |
download | mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.gz mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.bz2 mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.tar.xz mana-bd56bf8afdab16383ed8ad08412a8c807f84af85.zip |
Merged NETWORK branch (includes BEING_OVERHAUL).
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r-- | src/gui/ministatus.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index 6820d561..515a4014 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -30,7 +30,7 @@ #include <guichan/imagefont.hpp> #include "progressbar.h" -#include "../playerinfo.h" +#include "../localplayer.h" MiniStatusWindow::MiniStatusWindow(): Window("") @@ -67,13 +67,13 @@ MiniStatusWindow::MiniStatusWindow(): void MiniStatusWindow::update() { // HP Bar coloration - if (player_info->hp < int(player_info->maxHp / 3)) + if (player_node->hp < int(player_node->maxHp / 3)) { hpBar->setColor(223, 32, 32); // Red } else { - if (player_info->hp < int((player_info->maxHp / 3) * 2)) + if (player_node->hp < int((player_node->maxHp / 3) * 2)) { hpBar->setColor(230, 171, 34); // Orange } @@ -83,16 +83,16 @@ void MiniStatusWindow::update() } } - hpBar->setProgress((float)player_info->hp / (float)player_info->maxHp); - // mpBar->setProgress((float)player_info->mp / (float)player_info->maxMp); + hpBar->setProgress((float)player_node->hp / (float)player_node->maxHp); + // mpBar->setProgress((float)player_node->mp / (float)player_node->maxMp); // Update and center labels std::stringstream updatedText; - updatedText << player_info->hp; + updatedText << player_node->hp; hpLabel->setCaption(updatedText.str()); hpLabel->adjustSize(); updatedText.str(""); - updatedText << player_info->mp; + updatedText << player_node->mp; mpLabel->setCaption(updatedText.str()); mpLabel->adjustSize(); hpLabel->setPosition(hpBar->getX() + int((hpBar->getWidth() / 2) - (hpLabel->getWidth() / 2)), |