From 269e05e71f09cac3d181f2042cde01e5541658f3 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Tue, 3 Feb 2009 12:13:16 -0700 Subject: Made highlights configurable through the color dialog. Signed-off-by: Ira Rice --- src/gui/shoplistbox.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/gui/shoplistbox.cpp') diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index 9db33ac6..3d17fd55 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -26,6 +26,7 @@ #include #include +#include "colour.h" #include "shoplistbox.h" #include "../configuration.h" @@ -65,6 +66,10 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) if (config.getValue("guialpha", 0.8) != mAlpha) mAlpha = config.getValue("guialpha", 0.8); + bool valid; + const int red = (textColour->getColour('H', valid) >> 16) & 0xFF; + const int green = (textColour->getColour('H', valid) >> 8) & 0xFF; + const int blue = textColour->getColour('H', valid) & 0xFF; const int alpha = mAlpha * 255; Graphics *graphics = static_cast(gcnGraphics); @@ -80,7 +85,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) if (i == mSelected) { - backgroundColor = gcn::Color(235, 200, 115, alpha); + backgroundColor = gcn::Color(red, green, blue, alpha); } else if (mShopItems && mPlayerMoney < mShopItems->at(i)->getPrice() && mPriceCheck) -- cgit v1.2.3-70-g09d2