diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-03 12:13:16 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-03 12:13:16 -0700 |
commit | 269e05e71f09cac3d181f2042cde01e5541658f3 (patch) | |
tree | c8c65fac80dd78f8ec1bf6fb5c59eef9479bb1be /src/gui/listbox.cpp | |
parent | 0cf29b14232b08c7db9259bce26e96b59dac750c (diff) | |
download | mana-269e05e71f09cac3d181f2042cde01e5541658f3.tar.gz mana-269e05e71f09cac3d181f2042cde01e5541658f3.tar.bz2 mana-269e05e71f09cac3d181f2042cde01e5541658f3.tar.xz mana-269e05e71f09cac3d181f2042cde01e5541658f3.zip |
Made highlights configurable through the color dialog.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/listbox.cpp')
-rw-r--r-- | src/gui/listbox.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/listbox.cpp b/src/gui/listbox.cpp index 1de57593..643d234e 100644 --- a/src/gui/listbox.cpp +++ b/src/gui/listbox.cpp @@ -24,6 +24,7 @@ #include <guichan/listmodel.hpp> #include <guichan/mouseinput.hpp> +#include "colour.h" #include "listbox.h" #include "../configuration.h" @@ -43,9 +44,13 @@ void ListBox::draw(gcn::Graphics *graphics) 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->setColor(gcn::Color(235, 200, 115, alpha)); + graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->setFont(getFont()); const int fontHeight = getFont()->getHeight(); |