diff options
| author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2026-02-18 20:21:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-18 20:21:49 +0200 |
| commit | 3973ba17502f417099ae60cb983e1db7f2fc71f2 (patch) | |
| tree | 77051cbf1ffdbaacecde37cc047d15cd2b85464e | |
| parent | b3ea509c0b42ff774c52281ea200be634ec49e00 (diff) | |
#5397 Add a setting to see own group tag without seeing others
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
| -rw-r--r-- | indra/newview/llviewerdisplay.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 14 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.h | 4 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_general.xml | 52 |
5 files changed, 57 insertions, 28 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 27bcc1c1fc..f353d5fad9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10646,6 +10646,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>GroupTitlesTagMode</key> + <map> + <key>Comment</key> + <string>Select Group Titles tag mode: 0 - no group tags, 1 - only my group tag, 2 - all group tags</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>2</integer> + </map> <key>ShowAxes</key> <map> <key>Comment</key> diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 35ac7919ac..9dfa9a0efd 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -576,9 +576,9 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot) LLImageGL::updateStats(gFrameTimeSeconds); static LLCachedControl<S32> avatar_name_tag_mode(gSavedSettings, "AvatarNameTagMode", 1); - static LLCachedControl<bool> name_tag_show_group_titles(gSavedSettings, "NameTagShowGroupTitles", true); + static LLCachedControl<S32> name_tag_show_group_titles(gSavedSettings, "GroupTitlesTagMode", 2 /*all group tags*/); LLVOAvatar::sRenderName = avatar_name_tag_mode; - LLVOAvatar::sRenderGroupTitles = name_tag_show_group_titles && avatar_name_tag_mode > 0; + LLVOAvatar::sRenderGroupTitles = avatar_name_tag_mode > 0 ? name_tag_show_group_titles : 0; gPipeline.mBackfaceCull = true; gFrameCount++; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index aa7ab6e9e7..efb09479e2 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -217,6 +217,13 @@ enum ERenderName RENDER_NAME_FADE }; +enum ERenderGroupTitle +{ + RENDER_GROUP_TITLE_NEVER, + RENDER_GROUP_TITLE_SELF, + RENDER_GROUP_TITLE_ALWAYS +}; + #define JELLYDOLLS_SHOULD_IMPOSTOR //----------------------------------------------------------------------------- @@ -607,7 +614,7 @@ const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] = }; S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS; -bool LLVOAvatar::sRenderGroupTitles = true; +S32 LLVOAvatar::sRenderGroupTitles = RENDER_GROUP_TITLE_ALWAYS; S32 LLVOAvatar::sNumVisibleChatBubbles = 0; bool LLVOAvatar::sDebugInvisible = false; bool LLVOAvatar::sShowAttachmentPoints = false; @@ -3552,9 +3559,10 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name) addNameTagLine(line, name_tag_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall()); } + bool render_title = (sRenderGroupTitles == RENDER_GROUP_TITLE_ALWAYS) || + (isSelf() && (sRenderGroupTitles == RENDER_GROUP_TITLE_SELF)); - if (sRenderGroupTitles - && title && title->getString() && title->getString()[0] != '\0') + if (render_title && title && title->getString() && title->getString()[0] != '\0') { std::string title_str = title->getString(); LLStringFn::replace_ascii_controlchars(title_str,LL_UNKNOWN_CHAR); diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 1e563c4869..fc3a97a25d 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -354,7 +354,7 @@ public: //-------------------------------------------------------------------- public: static S32 sRenderName; - static bool sRenderGroupTitles; + static S32 sRenderGroupTitles; static const U32 NON_IMPOSTORS_MAX_SLIDER; /* Must equal the maximum allowed the RenderAvatarMaxNonImpostors * slider in panel_preferences_graphics1.xml */ static U32 sMaxNonImpostors; // affected by control "RenderAvatarMaxNonImpostors" @@ -1120,7 +1120,7 @@ private: bool mNameFriend; bool mNameCloud; F32 mNameAlpha; - bool mRenderGroupTitles; + S32 mRenderGroupTitles; //-------------------------------------------------------------------- // Display the name (then optionally fade it out) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index aa641a35f7..08b3ef69b6 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -295,16 +295,16 @@ tool_tip="Show username, like bobsmith123" top_delta="0" /> <check_box - control_name="NameTagShowGroupTitles" - enabled_control="AvatarNameTagMode" + control_name="UseDisplayNames" + follows="top|left" height="16" - label="Group titles" + label="Display names" layout="topleft" left="35" - width="100" - name="show_all_title_checkbox1" - tool_tip="Show group titles, like Officer or Member" - top_pad="3" /> + name="display_names_check" + width="100" + tool_tip="Check to use display names in chat, IM, name tags, etc." + top_pad="3"/> <check_box control_name="NameTagShowFriends" enabled_control="AvatarNameTagMode" @@ -313,19 +313,29 @@ layout="topleft" left_pad="50" name="show_friends" - tool_tip="Highlight the name tags of your friends"/> - <check_box - control_name="UseDisplayNames" - follows="top|left" - height="16" - label="View Display Names" - layout="topleft" - left="35" - name="display_names_check" - width="237" - tool_tip="Check to use display names in chat, IM, name tags, etc." - top_pad="3"/> - + tool_tip="Highlight the name tags of your friends"/> + <combo_box + height="23" + layout="topleft" + control_name="GroupTitlesTagMode" + enabled_control="AvatarNameTagMode" + left="39" + top_pad="3" + name="group_title" + width="130"> + <combo_box.item + label="No group tags" + name="no_tags" + value="0" /> + <combo_box.item + label="Only my group tag" + name="my_tag" + value="1" /> + <combo_box.item + label="All group tags" + name="all_tags" + value="2" /> + </combo_box> <text type="string" length="1" @@ -334,7 +344,7 @@ layout="topleft" left="30" name="inworld_typing_rg_label" - top_pad="1" + top_pad="4" width="400"> Pressing letter keys: </text> |
