German translation & general panel refactoring for localization due to FIRE-6664; Cleaned up code in llvoavatar.cpp
parent
583c4dfb40
commit
c8e736cab6
|
|
@ -3256,31 +3256,27 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|
|||
// <FS:Ansariel> Color name tags based on distance
|
||||
static LLCachedControl<bool> show_distance_color_tag(gSavedSettings, "FSTagShowDistanceColors");
|
||||
static LLCachedControl<bool> show_distance_in_tag(gSavedSettings, "FSTagShowDistance");
|
||||
// <FS:CR> FIRE-6664: Add whisper range to color tags
|
||||
static LLUIColor tag_whisper_color = LLUIColorTable::instance().getColor("NameTagWhisperDistanceColor", LLColor4::green);
|
||||
// </FS:CR> FIRE-6664: Add whisper range to color tags
|
||||
// <FS:CR> FIRE-6664: Add whisper range to color tags
|
||||
static LLUIColor tag_whisper_color = LLUIColorTable::instance().getColor("NameTagWhisperDistanceColor", LLColor4::green);
|
||||
// </FS:CR> FIRE-6664: Add whisper range to color tags
|
||||
static LLUIColor tag_chat_color = LLUIColorTable::instance().getColor("NameTagChatDistanceColor", LLColor4::green);
|
||||
static LLUIColor tag_shout_color = LLUIColorTable::instance().getColor("NameTagShoutDistanceColor", LLColor4::yellow);
|
||||
static LLUIColor tag_beyond_shout_color = LLUIColorTable::instance().getColor("NameTagBeyondShoutDistanceColor", LLColor4::red);
|
||||
|
||||
if (!isSelf() && (show_distance_color_tag || show_distance_in_tag))
|
||||
{
|
||||
static const F64 CHAT_RANGE_SQUARED = 400.f;
|
||||
static const F64 SHOUT_RANGE_SQUARED = 10000.f;
|
||||
|
||||
F64 distance_squared = dist_vec_squared(getPositionGlobal(), gAgent.getPositionGlobal());
|
||||
// <FS:CR> FIRE-6664: Add whisper range color tag
|
||||
if (distance_squared <= CHAT_WHISPER_RADIUS_SQUARED)
|
||||
{
|
||||
distance_color = tag_whisper_color;
|
||||
}
|
||||
//if (distance_squared <= CHAT_RANGE_SQUARED)
|
||||
else if (distance_squared <= CHAT_RANGE_SQUARED)
|
||||
// <FS:CR> FIRE-6664: Add whisper range color tag
|
||||
// <FS:CR> FIRE-6664: Add whisper range color tag
|
||||
if (distance_squared <= CHAT_WHISPER_RADIUS_SQUARED)
|
||||
{
|
||||
distance_color = tag_whisper_color;
|
||||
}
|
||||
else if (distance_squared <= CHAT_NORMAL_RADIUS_SQUARED)
|
||||
// </FS:CR> FIRE-6664: Add whisper range color tag
|
||||
{
|
||||
distance_color = tag_chat_color;
|
||||
}
|
||||
else if (distance_squared <= SHOUT_RANGE_SQUARED)
|
||||
else if (distance_squared <= CHAT_SHOUT_RADIUS_SQUARED)
|
||||
{
|
||||
distance_color = tag_shout_color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,12 +293,19 @@
|
|||
<color_swatch name="usernamecolorswatch" tool_tip="Anklicken um die Farbauswahl zu öffnen"/>
|
||||
<check_box label="Tag-Farbe basierend auf Entfernung" name="FSTagShowDistanceColors" tool_tip="Aktivieren, um die Tag-Farbe eines Avatars abhändig von der Entfernung (Chat-Reichweite, Ruf-Reichweite, außerhalb Ruf-Reichweite) zu setzen. Übersteuert Viewertag-Farben außer Hervorhebung von Freunden und Kontakt-Set-Farben."/>
|
||||
<check_box label="Entfernung im Tag anzeigen" name="FSTagShowDistance" tool_tip="Aktivieren, um die Entfernung eines Avatars in den nachfolgenden Farben im Tag anzuzeigen."/>
|
||||
<color_swatch name="NameTagWhisperDistanceColor_Color_Swatch" tool_tip="Anklicken um die Farbauswahl zu öffnen"/>
|
||||
<text name="NameTagWhisperDistanceColor_Label">
|
||||
Flüster-Reichweite
|
||||
</text>
|
||||
<color_swatch name="NameTagChatDistanceColor_Color_Swatch" tool_tip="Anklicken um die Farbauswahl zu öffnen"/>
|
||||
<text name="NameTagChatDistanceColor_Label">
|
||||
Chat-Reichweite
|
||||
</text>
|
||||
<color_swatch name="NameTagShoutDistanceColor_Color_Swatch" tool_tip="Anklicken um die Farbauswahl zu öffnen"/>
|
||||
<text name="NameTagShoutDistanceColor_Label">
|
||||
Ruf-Reichweite
|
||||
</text>
|
||||
<color_swatch name="NameTagBeyondShoutDistanceColor_Color_Swatch" tool_tip="Anklicken um die Farbauswahl zu öffnen"/>
|
||||
<text name="NameTagBeyondShoutDistanceColor_Label">
|
||||
Außerhalb Ruf-Reichweite
|
||||
</text>
|
||||
|
|
|
|||
|
|
@ -1817,6 +1817,7 @@
|
|||
top_pad="5"
|
||||
left="40"
|
||||
name="NameTagWhisperDistanceColor_Color_Swatch"
|
||||
tool_tip="Click to open color picker"
|
||||
width="15">
|
||||
<color_swatch.init_callback
|
||||
function="Pref.getUIColor"
|
||||
|
|
@ -1835,9 +1836,9 @@
|
|||
layout="topleft"
|
||||
left_pad="5"
|
||||
mouse_opaque="false"
|
||||
name="NameTagChatDistanceColor_Label"
|
||||
name="NameTagWhisperDistanceColor_Label"
|
||||
top_delta="3"
|
||||
width="85">
|
||||
width="200">
|
||||
Whisper range
|
||||
</text>
|
||||
<color_swatch
|
||||
|
|
@ -1847,8 +1848,9 @@
|
|||
label_height="0"
|
||||
layout="topleft"
|
||||
top_delta="-3"
|
||||
left_pad="4"
|
||||
left="250"
|
||||
name="NameTagChatDistanceColor_Color_Swatch"
|
||||
tool_tip="Click to open color picker"
|
||||
width="15">
|
||||
<color_swatch.init_callback
|
||||
function="Pref.getUIColor"
|
||||
|
|
@ -1869,7 +1871,7 @@
|
|||
mouse_opaque="false"
|
||||
name="NameTagChatDistanceColor_Label"
|
||||
top_delta="3"
|
||||
width="85">
|
||||
width="200">
|
||||
Chat range
|
||||
</text>
|
||||
<color_swatch
|
||||
|
|
@ -1878,10 +1880,11 @@
|
|||
height="15"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
left="40"
|
||||
name="NameTagShoutDistanceColor_Color_Swatch"
|
||||
tool_tip="Click to open color picker"
|
||||
width="15"
|
||||
top_delta="-3">
|
||||
top_pad="10">
|
||||
<color_swatch.init_callback
|
||||
function="Pref.getUIColor"
|
||||
parameter="NameTagShoutDistanceColor" />
|
||||
|
|
@ -1901,7 +1904,7 @@
|
|||
mouse_opaque="false"
|
||||
name="NameTagShoutDistanceColor_Label"
|
||||
top_delta="3"
|
||||
width="85">
|
||||
width="200">
|
||||
Shout range
|
||||
</text>
|
||||
<color_swatch
|
||||
|
|
@ -1910,8 +1913,9 @@
|
|||
height="15"
|
||||
label_height="0"
|
||||
layout="topleft"
|
||||
left_pad="4"
|
||||
left="250"
|
||||
name="NameTagBeyondShoutDistanceColor_Color_Swatch"
|
||||
tool_tip="Click to open color picker"
|
||||
width="15"
|
||||
top_delta="-3">
|
||||
<color_swatch.init_callback
|
||||
|
|
@ -1933,7 +1937,7 @@
|
|||
mouse_opaque="false"
|
||||
name="NameTagBeyondShoutDistanceColor_Label"
|
||||
top_delta="3"
|
||||
width="120">
|
||||
width="200">
|
||||
Beyond Shout range
|
||||
</text>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue