diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-07-21 23:28:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-07-21 23:28:16 +0300 |
commit | 42c0ad1606c1169422b0baba3b4d4ba1d1129d36 (patch) | |
tree | 4399c3472e52c594c20bfe52b8c31a05158f6c17 /src/gui | |
parent | 0db159ef0f611ba014c59e773a59661b92ab7fde (diff) | |
download | mv-42c0ad1606c1169422b0baba3b4d4ba1d1129d36.tar.gz mv-42c0ad1606c1169422b0baba3b4d4ba1d1129d36.tar.bz2 mv-42c0ad1606c1169422b0baba3b4d4ba1d1129d36.tar.xz mv-42c0ad1606c1169422b0baba3b4d4ba1d1129d36.zip |
Add two new colors to themes.
BUBBLE_NAME for speaker nick.
BUBBLE_TEXT for speach text.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/speechbubble.cpp | 4 | ||||
-rw-r--r-- | src/gui/speechbubble.h | 2 | ||||
-rw-r--r-- | src/gui/theme.cpp | 2 | ||||
-rw-r--r-- | src/gui/theme.h | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/speechbubble.cpp b/src/gui/speechbubble.cpp index 970b18ddb..ff20603ce 100644 --- a/src/gui/speechbubble.cpp +++ b/src/gui/speechbubble.cpp @@ -49,7 +49,7 @@ SpeechBubble::SpeechBubble(): mSpeechBox = new TextBox; mSpeechBox->setEditable(false); mSpeechBox->setOpaque(false); - mSpeechBox->setTextColor(&Theme::getThemeColor(Theme::CHAT)); + mSpeechBox->setTextColor(&Theme::getThemeColor(Theme::BUBBLE_TEXT)); add(mCaption); add(mSpeechBox); @@ -67,7 +67,7 @@ void SpeechBubble::setText(const std::string &text, bool showName) if (text == mText && (mCaption->getWidth() <= mSpeechBox->getMinWidth())) return; - mSpeechBox->setTextColor(&Theme::getThemeColor(Theme::TEXT)); + mSpeechBox->setTextColor(&Theme::getThemeColor(Theme::BUBBLE_TEXT)); 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 2f93cbd77..0208941c4 100644 --- a/src/gui/speechbubble.h +++ b/src/gui/speechbubble.h @@ -48,7 +48,7 @@ class SpeechBubble : public Popup */ void setCaption(const std::string &name, const gcn::Color *color = - &Theme::getThemeColor(Theme::TEXT)); + &Theme::getThemeColor(Theme::BUBBLE_NAME)); /** * Sets the text to be displayed. diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 108d736cd..1ec40b3ad 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -689,6 +689,8 @@ static int readColorType(const std::string &type) "WARNING", "CHARM", "PLAYER_ADVANCED", + "BUBBLE_NAME", + "BUBBLE_TEXT", "RED", "GREEN", "BLUE", diff --git a/src/gui/theme.h b/src/gui/theme.h index 56c0c57c7..1cf8d9aa6 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -201,6 +201,8 @@ class Theme : public Palette, public ConfigListener WARNING, CHARM, PLAYER_ADVANCED, + BUBBLE_NAME, + BUBBLE_TEXT, RED, GREEN, BLUE, |