diff options
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 25 | ||||
-rw-r--r-- | linden/indra/newview/llhoverview.cpp | 26 | ||||
-rw-r--r-- | linden/indra/newview/llprefsadvanced.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 30 | ||||
-rw-r--r-- | linden/indra/newview/llvoavatar.h | 3 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml | 20 |
6 files changed, 91 insertions, 17 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 1f5c7b2..dcbda36 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -1055,7 +1055,28 @@ | |||
1055 | </map> | 1055 | </map> |
1056 | 1056 | ||
1057 | <!-- Begin: Client Name Tag --> | 1057 | <!-- Begin: Client Name Tag --> |
1058 | 1058 | <key>ShowClientColor</key> | |
1059 | <map> | ||
1060 | <key>Comment</key> | ||
1061 | <string>Show *others* clients specific color in the name tag</string> | ||
1062 | <key>Persist</key> | ||
1063 | <integer>1</integer> | ||
1064 | <key>Type</key> | ||
1065 | <string>Boolean</string> | ||
1066 | <key>Value</key> | ||
1067 | <integer>1</integer> | ||
1068 | </map> | ||
1069 | <key>ShowClientNameHoverTip</key> | ||
1070 | <map> | ||
1071 | <key>Comment</key> | ||
1072 | <string>Show *others* client in the hovertip</string> | ||
1073 | <key>Persist</key> | ||
1074 | <integer>1</integer> | ||
1075 | <key>Type</key> | ||
1076 | <string>Boolean</string> | ||
1077 | <key>Value</key> | ||
1078 | <integer>1</integer> | ||
1079 | </map> | ||
1059 | <key>ShowClientNameTag</key> | 1080 | <key>ShowClientNameTag</key> |
1060 | <map> | 1081 | <map> |
1061 | <key>Comment</key> | 1082 | <key>Comment</key> |
@@ -1067,7 +1088,7 @@ | |||
1067 | <key>Value</key> | 1088 | <key>Value</key> |
1068 | <integer>1</integer> | 1089 | <integer>1</integer> |
1069 | </map> | 1090 | </map> |
1070 | 1091 | ||
1071 | <key>ShowMyClientTagToOthers</key> | 1092 | <key>ShowMyClientTagToOthers</key> |
1072 | <map> | 1093 | <map> |
1073 | <key>Comment</key> | 1094 | <key>Comment</key> |
diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp index 5d59818..8c367ab 100644 --- a/linden/indra/newview/llhoverview.cpp +++ b/linden/indra/newview/llhoverview.cpp | |||
@@ -64,6 +64,7 @@ | |||
64 | #include "llviewerparcelmgr.h" | 64 | #include "llviewerparcelmgr.h" |
65 | #include "llviewerregion.h" | 65 | #include "llviewerregion.h" |
66 | #include "llviewerwindow.h" | 66 | #include "llviewerwindow.h" |
67 | #include "llvoavatar.h" | ||
67 | #include "llglheaders.h" | 68 | #include "llglheaders.h" |
68 | #include "llviewerimagelist.h" | 69 | #include "llviewerimagelist.h" |
69 | //#include "lltoolobjpicker.h" | 70 | //#include "lltoolobjpicker.h" |
@@ -272,6 +273,31 @@ void LLHoverView::updateText() | |||
272 | line.append(LLTrans::getString("TooltipPerson")); | 273 | line.append(LLTrans::getString("TooltipPerson")); |
273 | } | 274 | } |
274 | mText.push_back(line); | 275 | mText.push_back(line); |
276 | |||
277 | if (gSavedSettings.getBOOL("ShowClientNameHoverTip")) | ||
278 | { | ||
279 | LLColor4 color; | ||
280 | std::string client; | ||
281 | LLVOAvatar* avatar = (LLVOAvatar*)hit_object; | ||
282 | if (avatar->isSelf()) | ||
283 | { | ||
284 | client="Client: Imprudence"; | ||
285 | } | ||
286 | else | ||
287 | { | ||
288 | LLVOAvatar::resolveClient(color, client, avatar); | ||
289 | if(client.empty() ||client == "Invalid" || client == "Failure") | ||
290 | { | ||
291 | client = "Client: <not available>"; | ||
292 | } | ||
293 | else | ||
294 | { | ||
295 | client = "Client: " + client; | ||
296 | } | ||
297 | } | ||
298 | mText.push_back(client); | ||
299 | |||
300 | } | ||
275 | } | 301 | } |
276 | else | 302 | else |
277 | { | 303 | { |
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index 7830c29..34c8eb2 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp | |||
@@ -58,6 +58,8 @@ BOOL LLPrefsAdvanced::postBuild() | |||
58 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); | 58 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); |
59 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); | 59 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); |
60 | childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); | 60 | childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); |
61 | childSetValue("client_name_color_check", gSavedSettings.getBOOL("ShowClientColor")); | ||
62 | childSetValue("client_name_hover_check", gSavedSettings.getBOOL("ShowClientNameHoverTip")); | ||
61 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); | 63 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); |
62 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); | 64 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); |
63 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); | 65 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); |
@@ -81,6 +83,8 @@ void LLPrefsAdvanced::apply() | |||
81 | gSavedSettings.setBOOL("DisableLoginLogoutScreens", childGetValue("disable_log_screen_check")); | 83 | gSavedSettings.setBOOL("DisableLoginLogoutScreens", childGetValue("disable_log_screen_check")); |
82 | gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check")); | 84 | gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check")); |
83 | gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check")); | 85 | gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check")); |
86 | gSavedSettings.setBOOL("ShowClientColor", childGetValue("client_name_color_check")); | ||
87 | gSavedSettings.setBOOL("ShowClientNameHoverTip", childGetValue("client_name_hover_check")); | ||
84 | gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); | 88 | gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); |
85 | gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); | 89 | gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); |
86 | gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); | 90 | gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 200b3a6..53962a9 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -3544,21 +3544,29 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) | |||
3544 | } | 3544 | } |
3545 | 3545 | ||
3546 | LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" ); | 3546 | LLColor4 avatar_name_color = gColors.getColor( "AvatarNameColor" ); |
3547 | if (gSavedSettings.getBOOL("ShowClientNameTag")) | 3547 | LLColor4 client_color = avatar_name_color; |
3548 | |||
3549 | if(!mIsSelf) //don't know your own client ? | ||
3548 | { | 3550 | { |
3549 | if(!mIsSelf) //don't know your own client ? | 3551 | new_name = TRUE; //lol or see the last client used |
3550 | { | 3552 | { |
3551 | new_name = TRUE; //lol or see the last client used | 3553 | resolveClient(client_color,client, this); |
3552 | { | ||
3553 | resolveClient(avatar_name_color,client, this); | ||
3554 | } | ||
3555 | } | ||
3556 | else | ||
3557 | { | ||
3558 | // Set your own name to the Imprudence color -- MC | ||
3559 | avatar_name_color = LLColor4(0.79f,0.44f,0.88f); | ||
3560 | } | 3554 | } |
3561 | } | 3555 | } |
3556 | else | ||
3557 | { | ||
3558 | // Set your own name to the Imprudence color -- MC | ||
3559 | client_color = LLColor4(0.79f,0.44f,0.88f); | ||
3560 | } | ||
3561 | if (gSavedSettings.getBOOL("ShowClientColor")) | ||
3562 | { | ||
3563 | avatar_name_color = client_color; | ||
3564 | } | ||
3565 | if (!gSavedSettings.getBOOL("ShowClientNameTag")) | ||
3566 | { | ||
3567 | client.clear(); | ||
3568 | } | ||
3569 | |||
3562 | avatar_name_color.setAlpha(alpha); | 3570 | avatar_name_color.setAlpha(alpha); |
3563 | mNameText->setColor(avatar_name_color); | 3571 | mNameText->setColor(avatar_name_color); |
3564 | 3572 | ||
diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h index 36ed22a..0c32244 100644 --- a/linden/indra/newview/llvoavatar.h +++ b/linden/indra/newview/llvoavatar.h | |||
@@ -658,10 +658,11 @@ private: | |||
658 | static LLVector3d sBeamLastAt; | 658 | static LLVector3d sBeamLastAt; |
659 | static LLSD sClientResolutionList; | 659 | static LLSD sClientResolutionList; |
660 | 660 | ||
661 | public: //anything against having this public? | ||
661 | static void resolveClient(LLColor4& avatar_name_color, std::string& client, LLVOAvatar* avatar); | 662 | static void resolveClient(LLColor4& avatar_name_color, std::string& client, LLVOAvatar* avatar); |
662 | //Imprudence FIXME | 663 | //Imprudence FIXME |
663 | // friend class LLFloaterAvatarList; | 664 | // friend class LLFloaterAvatarList; |
664 | 665 | // friend class LLHoverView; | |
665 | protected: | 666 | protected: |
666 | LLPointer<LLHUDEffectSpiral> mBeam; | 667 | LLPointer<LLHUDEffectSpiral> mBeam; |
667 | LLFrameTimer mBeamTimer; | 668 | LLFrameTimer mBeamTimer; |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml index de34ebd..7528809 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml | |||
@@ -14,10 +14,24 @@ | |||
14 | font="SansSerifSmall" height="16" initial_value="false" | 14 | font="SansSerifSmall" height="16" initial_value="false" |
15 | label="Disable teleport screen" left="12" mouse_opaque="true" | 15 | label="Disable teleport screen" left="12" mouse_opaque="true" |
16 | name="disable_tp_screen_check" radio_style="false" width="217" /> | 16 | name="disable_tp_screen_check" radio_style="false" width="217" /> |
17 | <check_box bottom_delta="-25" enabled="true" follows="left|top" | 17 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
18 | bottom_delta="-25" drop_shadow_visible="true" follows="left|top" | ||
19 | font="SansSerifsmall" h_pad="0" halign="left" height="16" left="16" | ||
20 | mouse_opaque="true" name="online_no" v_pad="0" width="200"> | ||
21 | Show client names: | ||
22 | </text> | ||
23 | <check_box bottom_delta="0" enabled="true" follows="left|top" | ||
24 | font="SansSerifSmall" height="16" initial_value="false" | ||
25 | label="in nametag" left_delta="100" mouse_opaque="true" | ||
26 | name="client_name_tag_check" radio_style="false" width="160" /> | ||
27 | <check_box bottom_delta="0" enabled="true" follows="left|top" | ||
28 | font="SansSerifSmall" height="16" initial_value="false" | ||
29 | label="changing nametag color" left_delta="80" mouse_opaque="true" | ||
30 | name="client_name_color_check" radio_style="false" width="160" /> | ||
31 | <check_box bottom_delta="0" enabled="true" follows="left|top" | ||
18 | font="SansSerifSmall" height="16" initial_value="false" | 32 | font="SansSerifSmall" height="16" initial_value="false" |
19 | label="Show client names in nametag" left="12" mouse_opaque="true" | 33 | label="in tooltip" left_delta="140" mouse_opaque="true" |
20 | name="client_name_tag_check" radio_style="false" width="217" /> | 34 | name="client_name_hover_check" radio_style="false" width="160" /> |
21 | <check_box bottom_delta="-18" enabled="true" follows="left|top" | 35 | <check_box bottom_delta="-18" enabled="true" follows="left|top" |
22 | font="SansSerifSmall" height="16" initial_value="false" | 36 | font="SansSerifSmall" height="16" initial_value="false" |
23 | label="Broadcast your client name to others" left="12" mouse_opaque="true" | 37 | label="Broadcast your client name to others" left="12" mouse_opaque="true" |