Add LiruUseMarkedColor to disable use of mark color in the new places
This commit is contained in:
@@ -1175,6 +1175,17 @@ Changing this setting only affects new text.</string>
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
</map>
|
</map>
|
||||||
|
<key>LiruUseMarkedColor</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Whether or not to use the color of marks done on radar and minimap to color tags and chat from those individuals</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>Boolean</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
</map>
|
||||||
<key>OBJExportNotifyFailed</key>
|
<key>OBJExportNotifyFailed</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ namespace
|
|||||||
}
|
}
|
||||||
} //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) :
|
LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string& name, const LLVector3d& position) :
|
||||||
mID(id), mName(name), mPosition(position), mMarked(mm_getMarkerColor(id)), mFocused(false),
|
mID(id), mName(name), mPosition(position), mMarked(mm_getMarkerColor(id)), mFocused(false),
|
||||||
mStats(),
|
mStats(),
|
||||||
|
|||||||
@@ -296,11 +296,17 @@ std::size_t hash_value(const LLUUID& uuid)
|
|||||||
return (std::size_t)uuid.getCRC32();
|
return (std::size_t)uuid.getCRC32();
|
||||||
}
|
}
|
||||||
boost::unordered_map<const LLUUID,LLColor4> mm_MarkerColors;
|
boost::unordered_map<const LLUUID,LLColor4> 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<bool> use_marked_color("LiruUseMarkedColor");
|
||||||
|
if (!use_marked_color) return nullptr;
|
||||||
|
}
|
||||||
auto it = mm_MarkerColors.find(id);
|
auto it = mm_MarkerColors.find(id);
|
||||||
return it == mm_MarkerColors.end() ? nullptr : &it->second;
|
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)
|
bool mm_getMarkerColor(const LLUUID& id, LLColor4& color)
|
||||||
{
|
{
|
||||||
@@ -668,10 +674,14 @@ void LLNetMap::draw()
|
|||||||
static const LLCachedControl<LLColor4> map_avatar_rollover_color(gSavedSettings, "ExodusMapRolloverColor", LLColor4::cyan);
|
static const LLCachedControl<LLColor4> map_avatar_rollover_color(gSavedSettings, "ExodusMapRolloverColor", LLColor4::cyan);
|
||||||
color = map_avatar_rollover_color;
|
color = map_avatar_rollover_color;
|
||||||
}
|
}
|
||||||
|
else if (auto mark_color = mm_getMarkerColor(uuid, true))
|
||||||
|
{
|
||||||
|
color = *mark_color;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bool getCustomColorRLV(const LLUUID&, LLColor4&, LLViewerRegion*, bool name_restricted);
|
bool getColorFor(const LLUUID & id, LLViewerRegion * parent_estate, LLColor4 & color, bool name_restricted = false);
|
||||||
getCustomColorRLV(uuid, color, LLWorld::getInstance()->getRegionFromPosGlobal(position), !show_friends);
|
getColorFor(uuid, LLWorld::getInstance()->getRegionFromPosGlobal(position), color, !show_friends);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLWorldMapView::drawAvatar(
|
LLWorldMapView::drawAvatar(
|
||||||
|
|||||||
Reference in New Issue
Block a user