Fix avatar names in radar being colored by distance, make that optional, default to old behavior

master
Cinders 2013-08-25 18:19:06 -06:00
parent 1d3b8514df
commit 08bbfb1273
2 changed files with 15 additions and 2 deletions

View File

@ -21002,5 +21002,16 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Backup</key>
<integer>0</integer>
</map>
<key>FSRadarColorNamesByDistance</key>
<map>
<key>Comment</key>
<string>Colors avatar nametags by distance in the radar.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@ -170,6 +170,7 @@ void FSRadar::updateRadarList()
static LLCachedControl<bool> sUseLSLBridge(gSavedSettings, "UseLSLBridge");
static LLCachedControl<F32> RenderFarClip(gSavedSettings, "RenderFarClip");
static LLCachedControl<bool> sFSLegacyRadarFriendColoring(gSavedSettings, "FSLegacyRadarFriendColoring");
static LLCachedControl<bool> sRadarColorNamesByDistance(gSavedSettings, "FSRadarColorNamesByDistance", false);
F32 drawRadius(RenderFarClip);
const LLVector3d& posSelf = gAgent.getPositionGlobal();
@ -513,13 +514,14 @@ void FSRadar::updateRadarList()
}
entry_options["name_style"] = nameCellStyle;
LLColor4 name_color = LGGContactSets::getInstance()->colorize(avId, range_color, LGG_CS_RADAR);
LLUIColor name_color = LLUIColorTable::instance().getColor("AvatarListItemIconDefaultColor", LLColor4::white);
name_color = LGGContactSets::getInstance()->colorize(avId, (sRadarColorNamesByDistance ? range_color : name_color), LGG_CS_RADAR);
if (LGGContactSets::getInstance()->hasFriendColorThatShouldShow(avId, LGG_CS_RADAR))
{
name_color = LGGContactSets::getInstance()->getFriendColor(avId);
}
entry_options["name_color"] = name_color.getValue();
entry_options["name_color"] = name_color.get().getValue();
// Voice power level indicator
LLVoiceClient* voice_client = LLVoiceClient::getInstance();