summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-06 00:55:29 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-06 00:55:29 +0300
commit55924e43101deef978c6f73ed5a4da63fcb58705 (patch)
tree92dcd05de197cac01346d99096dce48709fe591d /src/gui/widgets
parent478a5fcaa06b001915bd8950c3ef807d73c571ca (diff)
downloadmanaverse-55924e43101deef978c6f73ed5a4da63fcb58705.tar.gz
manaverse-55924e43101deef978c6f73ed5a4da63fcb58705.tar.bz2
manaverse-55924e43101deef978c6f73ed5a4da63fcb58705.tar.xz
manaverse-55924e43101deef978c6f73ed5a4da63fcb58705.zip
Add outline colors for button class.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/button.cpp24
-rw-r--r--src/gui/widgets/button.h4
2 files changed, 24 insertions, 4 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 1ae22aabe..0df94143e 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -71,9 +71,13 @@ Button::Button(const Widget2 *const widget) :
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(0),
@@ -100,9 +104,13 @@ Button::Button(const Widget2 *const widget,
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(0),
@@ -135,9 +143,13 @@ Button::Button(const Widget2 *const widget,
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(imageWidth),
@@ -170,9 +182,13 @@ Button::Button(const Widget2 *const widget, const std::string &imageName,
mXOffset(0),
mYOffset(0),
mEnabledColor(getThemeColor(Theme::BUTTON)),
+ mEnabledColor2(getThemeColor(Theme::BUTTON_OUTLINE)),
mDisabledColor(getThemeColor(Theme::BUTTON_DISABLED)),
+ mDisabledColor2(getThemeColor(Theme::BUTTON_DISABLED_OUTLINE)),
mHighlightedColor(getThemeColor(Theme::BUTTON_HIGHLIGHTED)),
+ mHighlightedColor2(getThemeColor(Theme::BUTTON_HIGHLIGHTED_OUTLINE)),
mPressedColor(getThemeColor(Theme::BUTTON_PRESSED)),
+ mPressedColor2(getThemeColor(Theme::BUTTON_PRESSED_OUTLINE)),
mImages(nullptr),
mImageSet(nullptr),
mImageWidth(imageWidth),
@@ -347,16 +363,16 @@ void Button::draw(gcn::Graphics *graphics)
switch (mode)
{
case BUTTON_DISABLED:
- graphics->setColor(mDisabledColor);
+ g2->setColorAll(mDisabledColor, mDisabledColor2);
break;
case BUTTON_PRESSED:
- graphics->setColor(mPressedColor);
+ g2->setColorAll(mPressedColor, mPressedColor2);
break;
case BUTTON_HIGHLIGHTED:
- graphics->setColor(mHighlightedColor);
+ g2->setColorAll(mHighlightedColor, mHighlightedColor2);
break;
default:
- graphics->setColor(mEnabledColor);
+ g2->setColorAll(mEnabledColor, mEnabledColor2);
break;
}
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index 90faa7d06..2fa2d64ac 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -153,9 +153,13 @@ class Button final : public gcn::Button,
int mXOffset;
int mYOffset;
gcn::Color mEnabledColor;
+ gcn::Color mEnabledColor2;
gcn::Color mDisabledColor;
+ gcn::Color mDisabledColor2;
gcn::Color mHighlightedColor;
+ gcn::Color mHighlightedColor2;
gcn::Color mPressedColor;
+ gcn::Color mPressedColor2;
Image **mImages;
ImageSet *mImageSet;
int mImageWidth;