From 3073a175d7d976ee6b0af34de0964d0270fbd47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 11 Feb 2020 17:19:40 -0500 Subject: [PATCH] Add LiruUseMarkedColor to disable use of mark color in the new places --- indra/newview/app_settings/settings_ascent.xml | 11 +++++++++++ indra/newview/llfloateravatarlist.cpp | 2 +- indra/newview/llnetmap.cpp | 16 +++++++++++++--- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 85bd84fd7..0c74e3164 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -1175,6 +1175,17 @@ Changing this setting only affects new text. Value 1 + LiruUseMarkedColor + + Comment + Whether or not to use the color of marks done on radar and minimap to color tags and chat from those individuals + Persist + 1 + Type + Boolean + Value + 1 + OBJExportNotifyFailed Comment diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 2c708204d..bedba75e5 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -134,7 +134,7 @@ namespace } } //namespace -const LLColor4* mm_getMarkerColor(const LLUUID& id); +const LLColor4* mm_getMarkerColor(const LLUUID& id, bool mark_only = true); LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string& name, const LLVector3d& position) : mID(id), mName(name), mPosition(position), mMarked(mm_getMarkerColor(id)), mFocused(false), mStats(), diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 466554111..727597f24 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -296,11 +296,17 @@ std::size_t hash_value(const LLUUID& uuid) return (std::size_t)uuid.getCRC32(); } boost::unordered_map mm_MarkerColors; -const LLColor4* mm_getMarkerColor(const LLUUID& id) +const LLColor4* mm_getMarkerColor(const LLUUID& id, bool mark_only) { + if (!mark_only) // They're trying to get the color and they're not the minimap or the radar mark + { + static const LLCachedControl use_marked_color("LiruUseMarkedColor"); + if (!use_marked_color) return nullptr; + } auto it = mm_MarkerColors.find(id); return it == mm_MarkerColors.end() ? nullptr : &it->second; } +const LLColor4* mm_getMarkerColor(const LLUUID& id) { return mm_getMarkerColor(id, false); } bool mm_getMarkerColor(const LLUUID& id, LLColor4& color) { @@ -668,10 +674,14 @@ void LLNetMap::draw() static const LLCachedControl map_avatar_rollover_color(gSavedSettings, "ExodusMapRolloverColor", LLColor4::cyan); color = map_avatar_rollover_color; } + else if (auto mark_color = mm_getMarkerColor(uuid, true)) + { + color = *mark_color; + } else { - bool getCustomColorRLV(const LLUUID&, LLColor4&, LLViewerRegion*, bool name_restricted); - getCustomColorRLV(uuid, color, LLWorld::getInstance()->getRegionFromPosGlobal(position), !show_friends); + bool getColorFor(const LLUUID & id, LLViewerRegion * parent_estate, LLColor4 & color, bool name_restricted = false); + getColorFor(uuid, LLWorld::getInstance()->getRegionFromPosGlobal(position), color, !show_friends); } LLWorldMapView::drawAvatar(