diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-25 21:30:47 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-25 21:30:47 +0100 |
commit | 65da3d5cd5c8cf40abc1e6d31b04eada615fe307 (patch) | |
tree | 70d570f181fddc5cddb7934b4735d2729ca44e11 /src/gui/ministatus.cpp | |
parent | 1610ed4b3bc9ea3328087818da0af3f5852d1ff5 (diff) | |
download | mana-client-65da3d5cd5c8cf40abc1e6d31b04eada615fe307.tar.gz mana-client-65da3d5cd5c8cf40abc1e6d31b04eada615fe307.tar.bz2 mana-client-65da3d5cd5c8cf40abc1e6d31b04eada615fe307.tar.xz mana-client-65da3d5cd5c8cf40abc1e6d31b04eada615fe307.zip |
Made the labels on the progress bars more readable
Diffstat (limited to 'src/gui/ministatus.cpp')
-rw-r--r-- | src/gui/ministatus.cpp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp index f49022b6..e613a745 100644 --- a/src/gui/ministatus.cpp +++ b/src/gui/ministatus.cpp @@ -21,8 +21,6 @@ #include "ministatus.h" -#include <guichan/widgets/label.hpp> - #include "gui.h" #include "progressbar.h" @@ -43,28 +41,14 @@ MiniStatusWindow::MiniStatusWindow(): mHpBar = new ProgressBar(1.0f, 100, 20, 0, 171, 34); mMpBar = new ProgressBar(1.0f, 100, 20, 26, 102, 230); mXpBar = new ProgressBar(1.0f, 100, 20, 143, 192, 211); - mHpLabel = new gcn::Label(""); - mMpLabel = new gcn::Label(""); - mXpLabel = new gcn::Label(""); mHpBar->setPosition(0, 3); mMpBar->setPosition(mHpBar->getWidth() + 3, 3); mXpBar->setPosition(mMpBar->getX() + mMpBar->getWidth() + 3, 3); - mHpLabel->setDimension(mHpBar->getDimension()); - mMpLabel->setDimension(mMpBar->getDimension()); - mXpLabel->setDimension(mXpBar->getDimension()); - - mHpLabel->setAlignment(gcn::Graphics::CENTER); - mMpLabel->setAlignment(gcn::Graphics::CENTER); - mXpLabel->setAlignment(gcn::Graphics::CENTER); - add(mHpBar); add(mMpBar); add(mXpBar); - add(mHpLabel); - add(mMpLabel); - add(mXpLabel); setContentSize(mXpBar->getX() + mXpBar->getWidth(), mXpBar->getY() + mXpBar->getHeight()); @@ -117,8 +101,8 @@ void MiniStatusWindow::update() (float) player_node->getXp() / player_node->mXpForNextLevel); // Update labels - mHpLabel->setCaption(toString(player_node->mHp)); - mMpLabel->setCaption(toString(player_node->mMp)); + mHpBar->setText(toString(player_node->mHp)); + mMpBar->setText(toString(player_node->mMp)); std::stringstream updatedText; updatedText << (int) ( @@ -138,7 +122,7 @@ void MiniStatusWindow::update() } */ - mXpLabel->setCaption(updatedText.str()); + mXpBar->setText(updatedText.str()); for (unsigned int i = 0; i < mIcons.size(); i++) if (mIcons[i]) |