diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-14 14:28:26 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-14 14:28:26 -0600 |
commit | 20ad38045482254b9875ee80de44a9b6f9367d2d (patch) | |
tree | d49324d952c6c4197464d98bda1043919594cd13 /src/gui/progressbar.cpp | |
parent | 3575c7a606c2d24c0d444e9999892c0390fa5ae8 (diff) | |
download | mana-20ad38045482254b9875ee80de44a9b6f9367d2d.tar.gz mana-20ad38045482254b9875ee80de44a9b6f9367d2d.tar.bz2 mana-20ad38045482254b9875ee80de44a9b6f9367d2d.tar.xz mana-20ad38045482254b9875ee80de44a9b6f9367d2d.zip |
Exposed the progress bar colors to the color management tab.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/progressbar.cpp')
-rw-r--r-- | src/gui/progressbar.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index bec86bb1..025e0ec5 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -23,6 +23,7 @@ #include <guichan/font.hpp> #include "gui.h" +#include "palette.h" #include "progressbar.h" #include "../configuration.h" @@ -133,18 +134,24 @@ void ProgressBar::draw(gcn::Graphics *graphics) const int textX = getWidth() / 2; const int textY = (getHeight() - f->getHeight()) / 2; + gcn::Color tempColor = guiPalette->getColor(Palette::OUTLINE); + graphics->setFont(f); - graphics->setColor(gcn::Color(0, 0, 0, alpha)); + graphics->setColor(gcn::Color((int) tempColor.r, (int) tempColor.g, + (int) tempColor.b, alpha)); graphics->drawText(mText, textX + 1, textY, gcn::Graphics::CENTER); graphics->drawText(mText, textX, textY - 1, gcn::Graphics::CENTER); graphics->drawText(mText, textX, textY + 1, gcn::Graphics::CENTER); graphics->drawText(mText, textX - 1, textY, gcn::Graphics::CENTER); - graphics->setColor(gcn::Color(255, 255, 255, alpha)); + tempColor = guiPalette->getColor(Palette::PROGRESS_BAR); + + graphics->setColor(gcn::Color((int) tempColor.r, (int) tempColor.g, + (int) tempColor.b, alpha)); graphics->drawText(mText, textX, textY, gcn::Graphics::CENTER); - graphics->setColor(gcn::Color(0, 0, 0)); + graphics->setColor(guiPalette->getColor(Palette::TEXT)); } } |