diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index cf7251e3e1..d2ac821801 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -11431,17 +11431,6 @@ Change of this parameter will affect the layout of buttons in notification toast
Value
1
- NameTagShowFriends
-
NameTagShowUsernames
+ FSColorizeFriends
+
+ FSColorizeMuted
+
+ FSColorizeLindens
+
+ FSColorizeFirestorm
+
+ FSColorizeSelf
+
+ FSColorizeChat
+
+ FSColorizeTags
+
+ FSColorizeMap
+
diff --git a/indra/newview/fsconsoleutils.cpp b/indra/newview/fsconsoleutils.cpp
index 2e233616ba..9786cca203 100644
--- a/indra/newview/fsconsoleutils.cpp
+++ b/indra/newview/fsconsoleutils.cpp
@@ -272,6 +272,12 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id,
}
LLColor4 textColor = LLUIColorTable::instance().getColor("AgentChatColor");
+
+ // FIRE-1061 - Color friends, lindens, muted, etc
+ static LLUICachedControl fs_colorize("FSColorizeChat");
+ if (fs_colorize)
+ textColor = LGGContactSets::getInstance()->getSpecialColor(agent_id, textColor);
+ //
//color based on contact sets prefs
if (LGGContactSets::getInstance()->hasFriendColorThatShouldShow(agent_id, LGG_CS_CHAT))
diff --git a/indra/newview/fsradar.cpp b/indra/newview/fsradar.cpp
index 9abd97755b..1b43aae79d 100644
--- a/indra/newview/fsradar.cpp
+++ b/indra/newview/fsradar.cpp
@@ -504,6 +504,10 @@ void FSRadar::updateRadarList()
}
entry_options["name_style"] = nameCellStyle;
+ // TODO: Decide whether we want special colored names in the radar or let the current UI suffice
+ //LLColor4 name_color = LGGContactSets::getInstance()->getSpecialColor(avId, range_color);
+ //entry_options["name_color"] = name_color.getValue();
+
if (LGGContactSets::getInstance()->hasFriendColorThatShouldShow(avId, LGG_CS_RADAR))
{
LLColor4 name_color = LGGContactSets::getInstance()->getFriendColor(avId);
diff --git a/indra/newview/lggcontactsets.cpp b/indra/newview/lggcontactsets.cpp
index 95e51eb909..4c67e45f43 100644
--- a/indra/newview/lggcontactsets.cpp
+++ b/indra/newview/lggcontactsets.cpp
@@ -19,12 +19,15 @@
#include "llviewerprecompiledheaders.h"
#include "lggcontactsets.h"
+#include "llagent.h"
+#include "llavatarnamecache.h"
+#include "llcallingcard.h"
+#include "lldir.h"
+#include "llmutelist.h"
+#include "llnotifications.h"
#include "llsdserialize.h"
#include "llviewercontrol.h"
-#include "llnotifications.h"
-#include "lldir.h"
-#include "llcallingcard.h"
-#include "llavatarnamecache.h"
+#include "fsdata.h"
#include "rlvhandler.h"
LGGContactSets::LGGContactSets() :
@@ -331,6 +334,43 @@ LLColor4 LGGContactSets::getGroupColor(const std::string& groupName)
return getDefaultColor();
};
+LLColor4 LGGContactSets::getSpecialColor(const LLUUID& uuid, const LLColor4& cur_color)
+{
+ LLColor4 color = cur_color;
+ FSData* fs_data = FSData::getInstance();
+ std::string full_name;
+ static LLUICachedControl fs_colorize_self("FSColorizeSelf");
+ static LLUICachedControl fs_colorize_friends("FSColorizeFriends");
+ static LLUICachedControl fs_colorize_muted("FSColorizeMuted");
+ static LLUICachedControl fs_colorize_lindens("FSColorizeLindens");
+ static LLUICachedControl fs_colorize_firestorm("FSColorizeFirestorm");
+ static LLUIColor avatar_self_color = LLUIColorTable::instance().getColor("UserChatColor", LLColor4::yellow);
+ static LLUIColor avatar_friend_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white);
+ static LLUIColor avatar_muted_color = LLUIColorTable::instance().getColor("MapAvatarMutedColor", LLColor4::grey3);
+ static LLUIColor avatar_linden_color = LLUIColorTable::instance().getColor("MapAvatarLindenColor", LLColor4::blue);
+ static LLUIColor avatar_firestorm_color = LLUIColorTable::instance().getColor("MapAvatarFirestormColor", LLColor4::red);
+
+ if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ return color;
+ else if (fs_colorize_self && uuid == gAgent.getID())
+ color = avatar_self_color;
+ else if (fs_colorize_muted && LLMuteList::getInstance()->isMuted(uuid))
+ color = avatar_muted_color;
+ else if (fs_colorize_friends && (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL))
+ color = avatar_friend_color;
+ else if (fs_colorize_lindens && gCacheName->getFullName(uuid, full_name) && LLMuteList::getInstance()->isLinden(full_name))
+ color = avatar_linden_color;
+ else if (fs_colorize_firestorm && (fs_data->is_developer(uuid) || fs_data->is_support(uuid)))
+ color = avatar_firestorm_color;
+
+ if (isNonFriend(uuid))
+ {
+ color = toneDownColor(color, 0.8f);
+ }
+
+ return color;
+}
+
LLColor4 LGGContactSets::getFriendColor(const LLUUID& friend_id, const std::string& ignoredGroupName)
{
LLColor4 toReturn = getDefaultColor();
diff --git a/indra/newview/lggcontactsets.h b/indra/newview/lggcontactsets.h
index 5828e3f62e..8f3f065099 100644
--- a/indra/newview/lggcontactsets.h
+++ b/indra/newview/lggcontactsets.h
@@ -53,6 +53,7 @@ public:
void setGroupColor(const std::string& groupName, const LLColor4& color);
LLColor4 getGroupColor(const std::string& groupName);
LLColor4 getFriendColor(const LLUUID& friend_id, const std::string& ignoredGroupName = "");
+ LLColor4 getSpecialColor(const LLUUID& uuid, const LLColor4& cur_color);
void setDefaultColor(const LLColor4& dColor);
LLColor4 getDefaultColor();
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index bde106f64a..51aa08f65f 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -491,8 +491,12 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.BackupDeselectAll", boost::bind(&LLFloaterPreference::onClickDeselectAll, this));
//
- gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
- gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
+ gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
+ //
+ //gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
+ gSavedSettings.getControl("FSColorizeTags")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
+ gSavedSettings.getControl("FSColorizeChat")->getCommitSignal()->connect(boost::bind(&FSFloaterIM::processChatHistoryStyleUpdate, _2));
+ //
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
// FIRE-6659: Legacy "Resident" name toggle
gSavedSettings.getControl("DontTrimLegacyNames")->getCommitSignal()->connect(boost::bind(&handleLegacyTrimOptionChanged, _2));
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 466e4eb394..6348132dd5 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -232,9 +232,6 @@ void LLNetMap::draw()
static LLFrameTimer map_timer;
static LLUIColor map_avatar_color = LLUIColorTable::instance().getColor("MapAvatarColor", LLColor4::white);
- static LLUIColor map_avatar_friend_color = LLUIColorTable::instance().getColor("MapAvatarFriendColor", LLColor4::white);
- static LLUIColor map_avatar_linden_color = LLUIColorTable::instance().getColor("MapAvatarLindenColor", LLColor4::blue);
- static LLUIColor map_avatar_muted_color = LLUIColorTable::instance().getColor("MapAvatarMutedColor", LLColor4::grey3);
static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
//static LLUIColor map_track_disabled_color = LLUIColorTable::instance().getColor("MapTrackDisabledColor", LLColor4::white);
static LLUIColor map_frustum_color = LLUIColorTable::instance().getColor("MapFrustumColor", LLColor4::white);
@@ -561,14 +558,6 @@ void LLNetMap::draw()
pos_map = globalPosToView(positions[i]);
LLUUID uuid = avatar_ids[i];
-// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
- bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL) &&
- (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
-// [/RLVa:KB]
-// bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
-
- LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
-
// Check for unknown Z-offset => AVATAR_UNKNOWN_Z_OFFSET
//unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z &&
// camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z;
@@ -589,22 +578,23 @@ void LLNetMap::draw()
pos_map.mV[VZ] = F32_MAX;
}
}
- //
-
- // Colorize muted avatars and Lindens
- std::string fullName;
- LLMuteList* muteListInstance = LLMuteList::getInstance();
-
- if (muteListInstance->isMuted(uuid)) color = map_avatar_muted_color;
- else if (gCacheName->getFullName(uuid, fullName) && muteListInstance->isLinden(fullName)) color = map_avatar_linden_color;
-
+ //
+
+ LLColor4 color = map_avatar_color; //
+
// Mark Avatars with special colors
if (LLNetMap::sAvatarMarksMap.find(uuid) != LLNetMap::sAvatarMarksMap.end())
{
color = LLNetMap::sAvatarMarksMap[uuid];
}
// Mark Avatars with special colors
-
+
+ // Color "special" avatars with special colors (Friends, muted, Lindens, etc)
+ static LLUICachedControl fs_colorize("FSColorizeMap");
+ if (fs_colorize)
+ color = LGGContactSets::getInstance()->getSpecialColor(uuid, color);
+ //
+
//color based on contact sets prefs
if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(uuid, LGG_CS_MINIMAP))
{
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp
index 2ebce6a5ff..cc53ffd79c 100644
--- a/indra/newview/llviewerchat.cpp
+++ b/indra/newview/llviewerchat.cpp
@@ -75,6 +75,13 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color, bool is_l
{
r_color = LLUIColorTable::instance().getColor("AgentChatColor");
}
+
+ // FIRE-1061 - Color friends, lindens, muted, etc
+ static LLUICachedControl fs_colorize("FSColorizeChat");
+ if (fs_colorize)
+ r_color = LGGContactSets::getInstance()->getSpecialColor(chat.mFromID, r_color);
+ //
+
//color based on contact sets prefs
if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(chat.mFromID, LGG_CS_CHAT))
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 8696e91c33..d0a8f3cf47 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2699,21 +2699,22 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
debugAvatarRezTime("AvatarRezLeftAppearanceNotification","left appearance mode");
}
}
- LLColor4 name_tag_color = getNameTagColor(is_friend);
+ // Colorize name tags
+ //LLColor4 name_tag_color = getNameTagColor(is_friend);
+ LLColor4 name_tag_color = getNameTagColor();
+ //
LLColor4 distance_color = name_tag_color;
std::string distance_string;
- static LLCachedControl fsShowOwnTagColor(gSavedSettings, "FSShowOwnTagColor");
- if (isSelf() && fsShowOwnTagColor)
- {
- static LLCachedControl firestormTagColor(gSavedPerAccountSettings, "FirestormTagColor");
- name_tag_color = firestormTagColor;
- }
-
// Wolfspirit: If we don't need to display a friend,
// if we aren't self, if we use colored Clienttags and if we have a color
// then use that color as name_tag_color
- static LLUICachedControl show_friends("NameTagShowFriends");
+ // Colorize tags
+ //static LLUICachedControl show_friends("NameTagShowFriends");
+ static LLUICachedControl colorize_friends("FSColorizeFriends");
+ static LLUICachedControl colorize_tags("FSColorizeTags");
+ bool show_friends = (colorize_friends && colorize_tags);
+ //
static LLUICachedControl color_client_tags("FSColorClienttags");
if(mClientTagData.has("color") && !(show_friends && (is_friend || LGGContactSets::getInstance()->hasFriendColorThatShouldShow(getID(), LGG_CS_TAG))) && color_client_tags > 0 && !this->isSelf())
{
@@ -2765,6 +2766,14 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
}
//
+ // Colorize tags
+ static LLCachedControl fsShowOwnTagColor(gSavedSettings, "FSShowOwnTagColor");
+ if (isSelf() && fsShowOwnTagColor)
+ {
+ static LLCachedControl firestormTagColor(gSavedPerAccountSettings, "FirestormTagColor");
+ name_tag_color = firestormTagColor;
+ }
+ //
// Rebuild name tag if state change detected
if (mNameString.empty()
@@ -2964,11 +2973,16 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
mNameText->clearString();
LLColor4 new_chat = LLUIColorTable::instance().getColor( isSelf() ? "UserChatColor" : "AgentChatColor" );
- //color based on contact sets prefs
- if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(getID(), LGG_CS_CHAT))
- {
- new_chat = LGGContactSets::getInstance()->getFriendColor(getID());
- }
+
+ // Colorize tags
+ new_chat = LGGContactSets::getInstance()->getSpecialColor(getID(), new_chat);
+
+ //color based on contact sets prefs
+ if(LGGContactSets::getInstance()->hasFriendColorThatShouldShow(getID(), LGG_CS_CHAT))
+ {
+ new_chat = LGGContactSets::getInstance()->getFriendColor(getID());
+ }
+ //
if (mVisibleChat)
{
@@ -3134,18 +3148,16 @@ void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha)
}
}
-LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
+// Colorize tags
+//LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
+LLColor4 LLVOAvatar::getNameTagColor()
+//
{
- static LLUICachedControl show_friends("NameTagShowFriends");
static LLUICachedControl use_old_color("FSUseV1TagColor");
// ...not using display names
- const char* color_name= "NameTagLegacy";
- if (show_friends && is_friend)
- {
- color_name = "NameTagFriend";
- }
- else if (LLAvatarNameCache::useDisplayNames())
+ LLColor4 color = LLUIColorTable::getInstance()->getColor("NameTagLegacy");
+ if (LLAvatarNameCache::useDisplayNames())
{
// ...color based on whether username "matches" a computed display
// name
@@ -3153,26 +3165,23 @@ LLColor4 LLVOAvatar::getNameTagColor(bool is_friend)
if (LLAvatarNameCache::get(getID(), &av_name)
&& av_name.mIsDisplayNameDefault)
{
- color_name = "NameTagMatch";
+ color = LLUIColorTable::getInstance()->getColor("NameTagMatch");
}
else
{
- color_name = "NameTagMismatch";
+ color = LLUIColorTable::getInstance()->getColor("NameTagMismatch");
}
}
+ // FIRE-1061 - Color friends, lindens, muted, etc
+ color = LGGContactSets::getInstance()->getSpecialColor(getID(), color);
+
if (LGGContactSets::getInstance()->hasFriendColorThatShouldShow(getID(), LGG_CS_TAG))
{
- return LGGContactSets::getInstance()->getFriendColor(getID());
+ color = LGGContactSets::getInstance()->getFriendColor(getID());
}
- //Wolfspirit: If we don't display a friend, then use "NameTagV1"
-
- if(use_old_color && !(show_friends && is_friend)){
- return LLUIColorTable::getInstance()->getColor("NameTagV1");
- }
-
- return LLUIColorTable::getInstance()->getColor( color_name );
+ return color;
}
void LLVOAvatar::idleUpdateBelowWater()
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index e84baf09b0..0ec8cc2f01 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -247,7 +247,10 @@ public:
void idleUpdateNameTagText(BOOL new_name);
LLVector3 idleUpdateNameTagPosition(const LLVector3& root_pos_last);
void idleUpdateNameTagAlpha(BOOL new_name, F32 alpha);
- LLColor4 getNameTagColor(bool is_friend);
+ // Colorize tags
+ //LLColor4 getNameTagColor(bool is_friend);
+ LLColor4 getNameTagColor();
+ //
void clearNameTag();
static void invalidateNameTag(const LLUUID& agent_id);
// force all name tags to rebuild, useful when display names turned on/off
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index 148e7bfb41..f1bc0c9129 100644
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -738,9 +738,12 @@
-
+
diff --git a/indra/newview/skins/default/xui/en/menu_mini_map.xml b/indra/newview/skins/default/xui/en/menu_mini_map.xml
index cead07f83d..e811cb0032 100644
--- a/indra/newview/skins/default/xui/en/menu_mini_map.xml
+++ b/indra/newview/skins/default/xui/en/menu_mini_map.xml
@@ -162,6 +162,66 @@
control="MiniMapObjects" />
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
index 90fd4b63c4..5e880dd467 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml
@@ -9,123 +9,148 @@
width="540"
label="Colors"
name="colors_panel">
-
- Selection Effects (Particle Beam):
-
-
- Minimap:
-
-
-
-
-
-
-
-
-
-
-
-
- Chat range
-
-
-
-
-
-
-
- Shout range
-
-
- UI Text Colors:
-
-
+
+
+
+ Selection Effects (Particle Beam):
+
+
+ Minimap:
+
+
+
+
+
+
+
+
+
+
+
+
+ Chat range
+
+
+
+
+
+
+
+ Shout range
+
+
+
+ UI Colors:
+
+
- My text
+ Me
-
+
+
+
+
+
+ Friends
+
+
+
+
+
+
+ Lindens
+
+
+
+
+
+
+ Firestorm
+
+
-
-
-
-
- Script Dialog Bg
-
-
-
-
-
-
- Script Dialog Fg
-
-
-
Direct
-
+
Name Tag / Bubble Chat / Console Opacity:
@@ -548,75 +605,6 @@
tool_tip="Choose name tag opacity"
top_delta = "6"
width="378" />
-
- Floating Window Opacity:
-
-
-
-
-
-
-
-
+
+
+
+ Floating Window Opacity:
+
+
+
+
+
+ Avatar Coloring:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+