From d4f7f4f688c3660440e0ac0d752ec9db036cdf59 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 May 2013 21:42:26 +0300 Subject: Add color for globals with player/npc name. New colors: GLOBAL, GLOBAL_OUTLINE. --- src/gui/theme.cpp | 5 +++++ src/gui/theme.h | 2 ++ src/gui/widgets/chattab.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index 13fb07382..f117563b5 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -185,6 +185,7 @@ Theme::Theme() : mColors[HIGHLIGHT].ch = 'H'; mColors[CHAT].ch = 'C'; mColors[GM].ch = 'G'; + mColors[GLOBAL].ch = 'g'; mColors[PLAYER].ch = 'Y'; mColors[WHISPER_TAB].ch = 'W'; mColors[WHISPER_TAB_OFFLINE].ch = 'w'; @@ -198,6 +199,7 @@ Theme::Theme() : mCharColors['H'] = HIGHLIGHT; mCharColors['C'] = CHAT; mCharColors['G'] = GM; + mCharColors['g'] = GLOBAL; mCharColors['Y'] = PLAYER; mCharColors['W'] = WHISPER_TAB; mCharColors['w'] = WHISPER_TAB_OFFLINE; @@ -213,6 +215,7 @@ Theme::Theme() : mCharColors['H' | 0x80] = HIGHLIGHT_OUTLINE; mCharColors['C' | 0x80] = CHAT_OUTLINE; mCharColors['G' | 0x80] = GM_OUTLINE; + mCharColors['g' | 0x80] = GLOBAL_OUTLINE; mCharColors['Y' | 0x80] = PLAYER_OUTLINE; mCharColors['W' | 0x80] = WHISPER_TAB_OUTLINE; mCharColors['w' | 0x80] = WHISPER_TAB_OFFLINE_OUTLINE; @@ -857,6 +860,8 @@ static int readColorType(const std::string &type) "CHAT_OUTLINE", "GM", "GM_OUTLINE", + "GLOBAL", + "GLOBAL_OUTLINE", "PLAYER", "PLAYER_OUTLINE", "WHISPER_TAB", diff --git a/src/gui/theme.h b/src/gui/theme.h index 443150a0f..21f541701 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -304,6 +304,8 @@ class Theme final : public Palette, public ConfigListener CHAT_OUTLINE, GM, GM_OUTLINE, + GLOBAL, + GLOBAL_OUTLINE, PLAYER, PLAYER_OUTLINE, WHISPER_TAB, diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 09b3bea6b..339d124f7 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -157,7 +157,7 @@ void ChatTab::chatLog(std::string line, Own own, // TRANSLATORS: chat message tmp.nick = strprintf(_("Global announcement from %s:"), tmp.nick.c_str()).append(" "); - lineColor = "##1"; // Equiv. to BrowserBox::RED + lineColor = "##g"; // Equiv. to BrowserBox::RED } break; case BY_PLAYER: -- cgit v1.2.3-70-g09d2