From c5a64309d9d792fc4ee3218f4db902e8a846a18a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 8 Sep 2012 15:17:51 +0300 Subject: Add new colors for whisper tabs. New colors: WHISPER_TAB_HIGHLIGHTED, WHISPER_TAB_OFFLINE_HIGHLIGHTED, WHISPER_TAB_SELECTED, WHISPER_TAB_OFFLINE_SELECTED --- src/gui/chatwindow.cpp | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/gui/chatwindow.cpp') diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 2aaa0da2d..7a8c3d63b 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -1025,7 +1025,7 @@ void ChatWindow::addWhisper(const std::string &nick, if (tempNick.compare(playerName) == 0) return; - ChatTab *tab = nullptr; + WhisperTab *tab = nullptr; const TabMap::const_iterator i = mWhispers.find(tempNick); if (i != mWhispers.end()) @@ -1099,8 +1099,8 @@ void ChatWindow::addWhisper(const std::string &nick, } } -ChatTab *ChatWindow::addWhisperTab(const std::string &nick, - const bool switchTo) +WhisperTab *ChatWindow::addWhisperTab(const std::string &nick, + const bool switchTo) { if (!player_node) return nullptr; @@ -1112,7 +1112,7 @@ ChatTab *ChatWindow::addWhisperTab(const std::string &nick, toLower(tempNick); const TabMap::const_iterator i = mWhispers.find(tempNick); - ChatTab *ret; + WhisperTab *ret; if (tempNick.compare(playerName) == 0) return nullptr; @@ -1137,7 +1137,7 @@ ChatTab *ChatWindow::addWhisperTab(const std::string &nick, return ret; } -ChatTab *ChatWindow::getWhisperTab(const std::string &nick) const +WhisperTab *ChatWindow::getWhisperTab(const std::string &nick) const { if (!player_node) return nullptr; @@ -1149,7 +1149,7 @@ ChatTab *ChatWindow::getWhisperTab(const std::string &nick) const toLower(tempNick); const TabMap::const_iterator i = mWhispers.find(tempNick); - ChatTab *ret = nullptr; + WhisperTab *ret = nullptr; if (tempNick.compare(playerName) == 0) return nullptr; @@ -1479,7 +1479,7 @@ void ChatWindow::updateOnline(std::set &onlinePlayers) if (onlinePlayers.find(tab->getNick()) != onlinePlayers.end()) { - tab->setTabColor(&Theme::getThemeColor(Theme::WHISPER_TAB)); + tab->setWhisperTabColors(); } else { @@ -1490,8 +1490,7 @@ void ChatWindow::updateOnline(std::set &onlinePlayers) nick, ActorSprite::PLAYER); if (being) { - tab->setTabColor(&Theme::getThemeColor( - Theme::WHISPER_TAB)); + tab->setWhisperTabColors(); continue; } } @@ -1500,8 +1499,7 @@ void ChatWindow::updateOnline(std::set &onlinePlayers) const PartyMember *const pm = party->getMember(nick); if (pm && pm->getOnline()) { - tab->setTabColor(&Theme::getThemeColor( - Theme::WHISPER_TAB)); + tab->setWhisperTabColors(); continue; } } @@ -1510,13 +1508,11 @@ void ChatWindow::updateOnline(std::set &onlinePlayers) const GuildMember *const gm = guild->getMember(nick); if (gm && gm->getOnline()) { - tab->setTabColor(&Theme::getThemeColor( - Theme::WHISPER_TAB)); + tab->setWhisperTabColors(); continue; } } - tab->setTabColor(&Theme::getThemeColor( - Theme::WHISPER_TAB_OFFLINE)); + tab->setWhisperTabOfflineColors(); } } } -- cgit v1.2.3-60-g2f50