Chat mention color

+Chat mention / username color can now be set via hex in the settings
+ Users can invert the color of the mention text black/white
+ if an invalid color is provided, the default will be used
This commit is contained in:
Matt Lowe
2015-01-30 00:48:50 +01:00
parent a31c15c752
commit ec8a2de2eb
5 changed files with 43 additions and 5 deletions

View File

@@ -45,6 +45,8 @@ SettingsCache::SettingsCache()
minPlayersForMultiColumnLayout = settings->value("interface/min_players_multicolumn", 5).toInt();
tapAnimation = settings->value("cards/tapanimation", true).toBool();
chatMention = settings->value("chat/mention", true).toBool();
chatMentionForeground = settings->value("chat/mentionforeground", true).toBool();
chatMentionColor = settings->value("chat/mentioncolor", "C21F2F").toString();
zoneViewSortByName = settings->value("zoneview/sortbyname", true).toBool();
zoneViewSortByType = settings->value("zoneview/sortbytype", true).toBool();
@@ -244,6 +246,16 @@ void SettingsCache::setChatMention(int _chatMention) {
settings->setValue("chat/mention", chatMention);
}
void SettingsCache::setChatMentionForeground(int _chatMentionForeground) {
chatMentionForeground = _chatMentionForeground;
settings->setValue("chat/mentionforeground", chatMentionForeground);
}
void SettingsCache::setChatMentionColor(const QString &_chatMentionColor) {
chatMentionColor = _chatMentionColor;
settings->setValue("chat/mentioncolor", chatMentionColor);
}
void SettingsCache::setZoneViewSortByName(int _zoneViewSortByName)
{
zoneViewSortByName = _zoneViewSortByName;