diff options
author | Majin Sniper <majinsniper@gmx.de> | 2009-03-12 22:42:42 +0100 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-12 21:53:00 -0600 |
commit | f0d5e3da15a308fcc962590330e7d8e39e8874b9 (patch) | |
tree | a0e7f61b1f6a2f2aee20549c9ac55a123ba3ccba /src/gui/widgets | |
parent | 5207b4cbb462cfa962a6f566897a6affd92eef94 (diff) | |
download | mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.gz mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.bz2 mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.tar.xz mana-f0d5e3da15a308fcc962590330e7d8e39e8874b9.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')
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 076a167f..0015beed 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -140,24 +140,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()); @@ -169,7 +165,7 @@ void DropDown::draw(gcn::Graphics* graphics) if (isFocused()) { - graphics->setColor(highlightColor); + graphics->setColor(*highlightColor); graphics->drawRectangle(gcn::Rectangle(0, 0, getWidth() - h, h)); } @@ -181,7 +177,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); |