summaryrefslogtreecommitdiff
path: root/src/gui/widgets/dropdown.cpp
diff options
context:
space:
mode:
authorMajin Sniper <majinsniper@gmx.de>2009-03-12 22:42:42 +0100
committerJared Adams <jaxad0127@gmail.com>2009-03-12 19:38:55 -0600
commit3b1fbbe072e4da86be4c8f8f22655d04565379d2 (patch)
tree9bae46138230c01fd2998395e146556f9a9db05b /src/gui/widgets/dropdown.cpp
parentb9191530c81595b0ad3d2faa6c4d21d75a720c29 (diff)
downloadmana-client-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.gz
mana-client-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.bz2
mana-client-3b1fbbe072e4da86be4c8f8f22655d04565379d2.tar.xz
mana-client-3b1fbbe072e4da86be4c8f8f22655d04565379d2.zip
Make use of the new available colors
This patch lets all being derivatives use the palette to set their name's colors. Text Particle Effects all respect the new settings. Some widgets were updated to use the colors.
Diffstat (limited to 'src/gui/widgets/dropdown.cpp')
-rw-r--r--src/gui/widgets/dropdown.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 022da0f0..b736591c 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -139,24 +139,20 @@ void DropDown::draw(gcn::Graphics* graphics)
}
}
-// bool valid;
const int alpha = (int)(mAlpha * 255.0f);
gcn::Color faceColor = getBaseColor();
faceColor.a = alpha;
- gcn::Color highlightColor = guiPalette->getColor(Palette::HIGHLIGHT, alpha);
+ const gcn::Color* highlightColor = &guiPalette->getColor(Palette::HIGHLIGHT,
+ alpha);
gcn::Color shadowColor = faceColor - 0x303030;
shadowColor.a = alpha;
if (mOpaque)
{
- gcn::Color col = getBackgroundColor();
- col.a = alpha;
- graphics->setColor(col);
+ graphics->setColor(guiPalette->getColor(Palette::BACKGROUND, alpha));
graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), h));
- col = getForegroundColor();
- col.a = alpha;
- graphics->setColor(col);
+ graphics->setColor(guiPalette->getColor(Palette::TEXT, alpha));
}
graphics->setFont(getFont());
@@ -168,7 +164,7 @@ void DropDown::draw(gcn::Graphics* graphics)
if (isFocused())
{
- graphics->setColor(highlightColor);
+ graphics->setColor(*highlightColor);
graphics->drawRectangle(gcn::Rectangle(0, 0, getWidth() - h, h));
}
@@ -180,7 +176,7 @@ void DropDown::draw(gcn::Graphics* graphics)
// Draw two lines separating the ListBox with selected
// element view.
- graphics->setColor(highlightColor);
+ graphics->setColor(*highlightColor);
graphics->drawLine(0, h, getWidth(), h);
graphics->setColor(shadowColor);
graphics->drawLine(0, h + 1, getWidth(), h + 1);