summaryrefslogtreecommitdiff
path: root/src/gui/shoplistbox.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-02-03 12:13:16 -0700
committerIra Rice <irarice@gmail.com>2009-02-03 12:13:16 -0700
commit269e05e71f09cac3d181f2042cde01e5541658f3 (patch)
treec8c65fac80dd78f8ec1bf6fb5c59eef9479bb1be /src/gui/shoplistbox.cpp
parent0cf29b14232b08c7db9259bce26e96b59dac750c (diff)
downloadmana-client-269e05e71f09cac3d181f2042cde01e5541658f3.tar.gz
mana-client-269e05e71f09cac3d181f2042cde01e5541658f3.tar.bz2
mana-client-269e05e71f09cac3d181f2042cde01e5541658f3.tar.xz
mana-client-269e05e71f09cac3d181f2042cde01e5541658f3.zip
Made highlights configurable through the color dialog.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/shoplistbox.cpp')
-rw-r--r--src/gui/shoplistbox.cpp7
1 files changed, 6 insertions, 1 deletions
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 <guichan/listmodel.hpp>
#include <guichan/mouseinput.hpp>
+#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<Graphics*>(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)