summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-06 14:07:31 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-06 14:07:31 +0300
commitc663cb7b46ab4dc70bc555cbb4414d5636ff02a0 (patch)
tree8f238f0a4763f8f60b31b9f7a116bad76f699ce1
parent6123e92adb91ff0ad232fb3fe38a8f218ebf3249 (diff)
downloadplus-c663cb7b46ab4dc70bc555cbb4414d5636ff02a0.tar.gz
plus-c663cb7b46ab4dc70bc555cbb4414d5636ff02a0.tar.bz2
plus-c663cb7b46ab4dc70bc555cbb4414d5636ff02a0.tar.xz
plus-c663cb7b46ab4dc70bc555cbb4414d5636ff02a0.zip
add outline colors in speechbubble.
-rw-r--r--src/gui/speechbubble.cpp11
-rw-r--r--src/gui/speechbubble.h6
-rw-r--r--src/gui/theme.cpp2
-rw-r--r--src/gui/theme.h2
4 files changed, 15 insertions, 6 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp
index 66aed08c1..9bd85ad43 100644
--- a/src/gui/speechbubble.cpp
+++ b/src/gui/speechbubble.cpp
@@ -46,18 +46,20 @@ SpeechBubble::SpeechBubble() :
mCaption->setFont(boldFont);
mSpeechBox->setEditable(false);
mSpeechBox->setOpaque(false);
- mSpeechBox->setForegroundColor(getThemeColor(Theme::BUBBLE_TEXT));
+ mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT),
+ getThemeColor(Theme::BUBBLE_TEXT_OUTLINE));
add(mCaption);
add(mSpeechBox);
}
void SpeechBubble::setCaption(const std::string &name,
- const gcn::Color *const color)
+ const gcn::Color *const color1,
+ const gcn::Color *const color2)
{
mCaption->setCaption(name);
mCaption->adjustSize();
- mCaption->setForegroundColor(*color);
+ mCaption->setForegroundColorAll(*color1, *color2);
}
void SpeechBubble::setText(const std::string &text, const bool showName)
@@ -65,7 +67,8 @@ void SpeechBubble::setText(const std::string &text, const bool showName)
if (text == mText && (mCaption->getWidth() <= mSpeechBox->getMinWidth()))
return;
- mSpeechBox->setForegroundColor(getThemeColor(Theme::BUBBLE_TEXT));
+ mSpeechBox->setForegroundColorAll(getThemeColor(Theme::BUBBLE_TEXT),
+ getThemeColor(Theme::BUBBLE_TEXT_OUTLINE));
int width = mCaption->getWidth() + 2 * getPadding();
mSpeechBox->setTextWrapped(text, 130 > width ? 130 : width);
diff --git a/src/gui/speechbubble.h b/src/gui/speechbubble.h
index ac59156a2..19efd6017 100644
--- a/src/gui/speechbubble.h
+++ b/src/gui/speechbubble.h
@@ -45,8 +45,10 @@ class SpeechBubble final : public Popup
* Sets the name displayed for the speech bubble, and in what color.
*/
void setCaption(const std::string &name,
- const gcn::Color *const color =
- &Theme::getThemeColor(Theme::BUBBLE_NAME));
+ const gcn::Color *const color1 =
+ &Theme::getThemeColor(Theme::BUBBLE_NAME),
+ const gcn::Color *const color2 =
+ &Theme::getThemeColor(Theme::BUBBLE_NAME_OUTLINE));
/**
* Sets the text to be displayed.
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index fad36d62a..999b2ec2b 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -920,7 +920,9 @@ static int readColorType(const std::string &type)
"CHARM_OUTLINE",
"PLAYER_ADVANCED",
"BUBBLE_NAME",
+ "BUBBLE_NAME_OUTLINE",
"BUBBLE_TEXT",
+ "BUBBLE_TEXT_OUTLINE",
"RED",
"RED_OUTLINE",
"GREEN",
diff --git a/src/gui/theme.h b/src/gui/theme.h
index 812689048..38e3b7024 100644
--- a/src/gui/theme.h
+++ b/src/gui/theme.h
@@ -360,7 +360,9 @@ class Theme final : public Palette, public ConfigListener
CHARM_OUTLINE,
PLAYER_ADVANCED,
BUBBLE_NAME,
+ BUBBLE_NAME_OUTLINE,
BUBBLE_TEXT,
+ BUBBLE_TEXT_OUTLINE,
RED,
RED_OUTLINE,
GREEN,