diff options
author | James Cook <james@lindenlab.com> | 2010-02-18 18:46:41 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-18 18:46:41 -0800 |
commit | ee81adb01b8619302898471fdbba5c93f716d10b (patch) | |
tree | 559001412f567f8f8988a89efd88f19bc5030c93 /indra/newview | |
parent | 9cb30255b6b8827410a32c6bee1c22b8011de60e (diff) |
Preference to set what fields name tags display, and
first attempt at "use display names" menu item which
doesn't work yet
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 35 | ||||
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 3 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 60 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 9 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_general.xml | 85 |
8 files changed, 151 insertions, 52 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d0c2f3cb34..0df53559df 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7089,7 +7089,7 @@ <key>Value</key> <integer>0</integer> </map> - <key>RenderShowGroupTitleAll</key> + <key>NameTagShowGroupTitles</key> <map> <key>Comment</key> <string>Show group titles in name labels</string> @@ -7098,6 +7098,39 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> + <integer>0</integer> + </map> + <key>NameTagShowDisplayNames</key> + <map> + <key>Comment</key> + <string>Show display names in name labels</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> + <key>NameTagShowSLIDs</key> + <map> + <key>Comment</key> + <string>Show Second Life IDs in name labels</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>NameTagShowStatus</key> + <map> + <key>Comment</key> + <string>Show status (AFK, Busy) in name labels</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> <integer>1</integer> </map> <key>RenderInitError</key> diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 6dddc133c2..c4fd5a07c1 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -613,7 +613,8 @@ void LLInspectAvatar::onNameCache( // IDEVO JAMESDEBUG - need to always display a display name LLAvatarName av_name; - if (LLAvatarNameCache::get(mAvatarID, &av_name)) + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(mAvatarID, &av_name)) { getChild<LLUICtrl>("user_name")->setValue(av_name.mDisplayName); getChild<LLUICtrl>("user_slid")->setValue(av_name.mSLID); diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 9480ca0fdf..1ddf6db0e2 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -873,7 +873,8 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } } LLAvatarName av_name; - if (LLAvatarNameCache::get(hover_object->getID(), &av_name)) + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(hover_object->getID(), &av_name)) { final_name = av_name.mDisplayName + " (" + av_name.mSLID + ")"; } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index ba256d70e8..b0a143438b 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -324,7 +324,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLImageGL::updateStats(gFrameTimeSeconds); LLVOAvatar::sRenderName = gSavedSettings.getS32("AvatarNameTagMode"); - LLVOAvatar::sRenderGroupTitles = (gSavedSettings.getBOOL("RenderShowGroupTitleAll") && gSavedSettings.getS32("AvatarNameTagMode")); + LLVOAvatar::sRenderGroupTitles = (gSavedSettings.getBOOL("NameTagShowGroupTitles") && gSavedSettings.getS32("AvatarNameTagMode")); gPipeline.mBackfaceCull = TRUE; gFrameCount++; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7fc7f2101a..974413141f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -34,6 +34,7 @@ #include "llviewermenu.h" // linden library includes +#include "llavatarnamecache.h" // IDEVO #include "llfloaterreg.h" #include "llcombobox.h" #include "llinventorypanel.h" @@ -7716,6 +7717,11 @@ void initialize_menus() view_listener_t::addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole"); view_listener_t::addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); view_listener_t::addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); + + // IDEVO + commit.add("IDEVO.ToggleDisplayNames", boost::bind(&LLAvatarNameCache::toggleDisplayNames)); + enable.add("IDEVO.CheckDisplayNames", boost::bind(&LLAvatarNameCache::useDisplayNames)); + // Advanced > HUD Info view_listener_t::addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); view_listener_t::addMenu(new LLAdvancedCheckHUDInfo(), "Advanced.CheckHUDInfo"); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e4de75d173..04809caa6f 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2805,50 +2805,62 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) line += "\n"; } + static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames"); + static LLUICachedControl<bool> show_slids("NameTagShowSLIDs"); + LLAvatarName av_name; - if (LLAvatarNameCache::get(getID(), &av_name)) + if (LLAvatarNameCache::useDisplayNames() + && LLAvatarNameCache::get(getID(), &av_name)) { - line += av_name.mDisplayName; + if (show_display_names) + { + line += av_name.mDisplayName; + line += "\n"; + } + if (show_slids) + { + line += "("; + line += av_name.mSLID; + line += ")\n"; + } } else { - line += LLCacheName::buildFullName( firstname->getString(), lastname->getString() ); + if (show_display_names || show_slids) + { + line += LLCacheName::buildFullName( firstname->getString(), lastname->getString() ); + line += "\n"; + } } - BOOL need_comma = FALSE; - - if (is_away || is_muted || is_busy) + static LLUICachedControl<bool> show_status("NameTagShowStatus"); + if (show_status + && (is_away || is_muted || is_busy || is_appearance) ) { - line += " ("; + //line += "("; if (is_away) { line += LLTrans::getString("AvatarAway"); - need_comma = TRUE; + line += ", "; } if (is_busy) { - if (need_comma) - { - line += ", "; - } line += LLTrans::getString("AvatarBusy"); - need_comma = TRUE; + line += ", "; } if (is_muted) { - if (need_comma) - { - line += ", "; - } line += LLTrans::getString("AvatarMuted"); - need_comma = TRUE; + line += ", "; } - line += ")"; - } - if (is_appearance) - { - line += "\n"; - line += LLTrans::getString("AvatarEditingAppearance"); + if (is_appearance) + { + line += LLTrans::getString("AvatarEditingAppearance"); + line += ", "; + } + // trim last ", " + line.resize( line.length() - 2 ); + //line += ")"; } mNameAway = is_away; mNameBusy = is_busy; diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 95ce6d6ff4..21c2ba51e3 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -9,6 +9,15 @@ layout="topleft" name="Me" tear_off="true"> + <menu_item_check + label="IDEVO Display Name Prototype" + name="display_name_prototype"> + <menu_item_check.on_check + function="IDEVO.CheckDisplayNames" /> + <menu_item_check.on_click + function="IDEVO.ToggleDisplayNames" /> + </menu_item_check> + <menu_item_separator /> <menu_item_call label="Preferences" layout="topleft" 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 099c789e4b..acc9321abd 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -195,60 +195,97 @@ </text> <radio_group control_name="AvatarNameTagMode" - height="20" + height="45" layout="topleft" left="50" name="Name_Tag_Preference"> <radio_item label="Off" - layout="topleft" name="radio" value="0" width="75" /> <radio_item label="On" - layout="topleft" - left_pad="12" + left_delta="0" name="radio2" + top_pad="5" value="1" width="75" /> <radio_item label="Show briefly" - layout="topleft" - left_pad="12" + left_delta="0" name="radio3" + top_pad="5" value="2" width="160" /> </radio_group> <check_box enabled_control="AvatarNameTagMode" - control_name="RenderNameShowSelf" - height="16" - label="Show my name" - layout="topleft" - left="50" - name="show_my_name_checkbox1" - width="300" /> - <check_box - enabled_control="AvatarNameTagMode" control_name="SmallAvatarNames" height="16" initial_value="true" label="Small name tags" layout="topleft" - left_delta="175" + left="70" name="small_avatar_names_checkbox" + top_pad="4" width="200" /> - <check_box + <check_box enabled_control="AvatarNameTagMode" - control_name="RenderShowGroupTitleAll" + control_name="RenderNameShowSelf" height="16" - label="Show group titles" + label="Show my name" layout="topleft" - left_delta="-175" - name="show_all_title_checkbox1" - top_pad="5" + left="70" + name="show_my_name_checkbox1" + top_pad="4" width="300" /> + <text + follows="left|top" + height="15" + layout="topleft" + left="250" + name="name_tags_textbox" + top="175" + width="200"> + Tags show: + </text> + <check_box + control_name="NameTagShowGroupTitles" + enabled_control="AvatarNameTagMode" + height="16" + label="Group titles" + left="265" + name="show_all_title_checkbox1" + tool_tip="Show group titles, like Officer or Member" + top_pad="5" /> + <check_box + control_name="NameTagShowDisplayNames" + enabled_control="AvatarNameTagMode" + height="16" + label="Display names" + left_delta="0" + name="show_display_names" + tool_tip="Show display names, like José Sanchez" + top_pad="5" /> + <check_box + control_name="NameTagShowSLIDs" + enabled_control="AvatarNameTagMode" + height="16" + label="Second Life IDs" + left_delta="0" + name="show_slids" + tool_tip="Show SL ID, like bobsmith123" + top_pad="5" /> + <check_box + control_name="NameTagShowStatus" + enabled_control="AvatarNameTagMode" + height="16" + label="Status" + left_delta="0" + name="show_status" + tool_tip="Show status, like AFK or Busy" + top_pad="5" /> <text type="string" length="1" @@ -257,7 +294,7 @@ layout="topleft" left="30" name="effects_color_textbox" - top_pad="15" + top="290" width="200"> My effects: </text> @@ -339,7 +376,7 @@ hover="false" commit_on_focus_lost = "true" follows="left|top" - height="60" + height="45" layout="topleft" left="50" name="busy_response" |