diff options
author | Maximilian Philipps <Turmfalke2007@web.de> | 2009-08-01 12:34:03 +0200 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-08-01 08:31:22 -0600 |
commit | 907b4a126e16c56d7b372ea7fa0ed750e4302133 (patch) | |
tree | 0ad101fcb5e3d578977d19d276ce08b0e4417d5c /src/gui/widgets | |
parent | ede286e65f1ccbf4ddfddba7be66467272440a13 (diff) | |
download | mana-907b4a126e16c56d7b372ea7fa0ed750e4302133.tar.gz mana-907b4a126e16c56d7b372ea7fa0ed750e4302133.tar.bz2 mana-907b4a126e16c56d7b372ea7fa0ed750e4302133.tar.xz mana-907b4a126e16c56d7b372ea7fa0ed750e4302133.zip |
makes the colour for buttons and disabled buttons configurable
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/button.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp index 71579bd4..2357b263 100644 --- a/src/gui/widgets/button.cpp +++ b/src/gui/widgets/button.cpp @@ -152,7 +152,10 @@ void Button::draw(gcn::Graphics *graphics) static_cast<Graphics*>(graphics)-> drawImageRect(0, 0, getWidth(), getHeight(), button[mode]); - graphics->setColor(guiPalette->getColor(Palette::TEXT)); + if (mode == BUTTON_DISABLED) + graphics->setColor(guiPalette->getColor(Palette::BUTTON_DISABLED)); + else + graphics->setColor(guiPalette->getColor(Palette::BUTTON)); int textX; int textY = getHeight() / 2 - getFont()->getHeight() / 2; |