summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-08 15:17:51 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-08 15:28:43 +0300
commitc5a64309d9d792fc4ee3218f4db902e8a846a18a (patch)
tree08618c439436faa4f5265f4967a426b44fa79889 /src/gui/chatwindow.cpp
parent58b4f0bc45f9b866899db035664378969e583b01 (diff)
downloadplus-c5a64309d9d792fc4ee3218f4db902e8a846a18a.tar.gz
plus-c5a64309d9d792fc4ee3218f4db902e8a846a18a.tar.bz2
plus-c5a64309d9d792fc4ee3218f4db902e8a846a18a.tar.xz
plus-c5a64309d9d792fc4ee3218f4db902e8a846a18a.zip
Add new colors for whisper tabs.
New colors: WHISPER_TAB_HIGHLIGHTED, WHISPER_TAB_OFFLINE_HIGHLIGHTED, WHISPER_TAB_SELECTED, WHISPER_TAB_OFFLINE_SELECTED
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp26
1 files changed, 11 insertions, 15 deletions
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<std::string> &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<std::string> &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<std::string> &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<std::string> &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();
}
}
}