diff options
author | McCabe Maxsted | 2010-08-23 01:29:47 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-08-28 05:01:13 -0700 |
commit | bc1263e920eb673f3c93edb8757b97b9a8a7125a (patch) | |
tree | a20efb2af4f4ef0275fe63ace4c7cddae9a48a05 /linden | |
parent | Updated the about window to include the Cool VL Viewer and mention Kitty as t... (diff) | |
download | meta-impy-bc1263e920eb673f3c93edb8757b97b9a8a7125a.zip meta-impy-bc1263e920eb673f3c93edb8757b97b9a8a7125a.tar.gz meta-impy-bc1263e920eb673f3c93edb8757b97b9a8a7125a.tar.bz2 meta-impy-bc1263e920eb673f3c93edb8757b97b9a8a7125a.tar.xz |
Toggle between limited and sim-wide range for radar
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | linden/indra/newview/panelradar.cpp | 33 | ||||
-rw-r--r-- | linden/indra/newview/panelradar.h | 3 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_radar.xml | 14 |
4 files changed, 54 insertions, 7 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index f0d6376..c8a247f 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -524,6 +524,17 @@ | |||
524 | <key>Value</key> | 524 | <key>Value</key> |
525 | <integer>0</integer> | 525 | <integer>0</integer> |
526 | </map> | 526 | </map> |
527 | <key>RadarSimWide</key> | ||
528 | <map> | ||
529 | <key>Comment</key> | ||
530 | <string>If true, radar shows everyone in the sim</string> | ||
531 | <key>Persist</key> | ||
532 | <integer>1</integer> | ||
533 | <key>Type</key> | ||
534 | <string>Boolean</string> | ||
535 | <key>Value</key> | ||
536 | <integer>0</integer> | ||
537 | </map> | ||
527 | <key>SavedRenderFarClip</key> | 538 | <key>SavedRenderFarClip</key> |
528 | <map> | 539 | <map> |
529 | <key>Comment</key> | 540 | <key>Comment</key> |
diff --git a/linden/indra/newview/panelradar.cpp b/linden/indra/newview/panelradar.cpp index ce91da2..cfaffde 100644 --- a/linden/indra/newview/panelradar.cpp +++ b/linden/indra/newview/panelradar.cpp | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include "panelradar.h" | 30 | #include "panelradar.h" |
31 | 31 | ||
32 | #include "hippoLimits.h" | ||
32 | #include "llagent.h" | 33 | #include "llagent.h" |
33 | #include "llchat.h" | 34 | #include "llchat.h" |
34 | #include "llfloateravatarinfo.h" | 35 | #include "llfloateravatarinfo.h" |
@@ -45,6 +46,7 @@ | |||
45 | #include "llregionposition.h" | 46 | #include "llregionposition.h" |
46 | #include "roles_constants.h" | 47 | #include "roles_constants.h" |
47 | #include "llscrolllistctrl.h" | 48 | #include "llscrolllistctrl.h" |
49 | #include "llspinctrl.h" | ||
48 | #include "lltracker.h" | 50 | #include "lltracker.h" |
49 | #include "lluictrlfactory.h" | 51 | #include "lluictrlfactory.h" |
50 | #include "llviewercontrol.h" | 52 | #include "llviewercontrol.h" |
@@ -77,6 +79,11 @@ BOOL PanelRadar::postBuild() | |||
77 | childSetCommitCallback("RadarList", onUseRadarList, this); | 79 | childSetCommitCallback("RadarList", onUseRadarList, this); |
78 | mRadarList->setDoubleClickCallback(onClickIM); | 80 | mRadarList->setDoubleClickCallback(onClickIM); |
79 | 81 | ||
82 | childSetCommitCallback("simwide_checkbox", onCheckSimWide, this); | ||
83 | |||
84 | // Set max range to max height | ||
85 | getChild<LLSpinCtrl>("near_me_range")->setMaxValue(gHippoLimits->getMaxHeight()); | ||
86 | |||
80 | childSetAction("im_btn", onClickIM, this); | 87 | childSetAction("im_btn", onClickIM, this); |
81 | childSetAction("profile_btn", onClickProfile, this); | 88 | childSetAction("profile_btn", onClickProfile, this); |
82 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); | 89 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); |
@@ -216,8 +223,6 @@ void PanelRadar::updateRadarDisplay() | |||
216 | F32 range = gSavedSettings.getF32("NearMeRange"); | 223 | F32 range = gSavedSettings.getF32("NearMeRange"); |
217 | bool notify_chat = gSavedSettings.getBOOL("MiniMapNotifyChatRange"); | 224 | bool notify_chat = gSavedSettings.getBOOL("MiniMapNotifyChatRange"); |
218 | bool notify_sim = gSavedSettings.getBOOL("MiniMapNotifySimRange"); | 225 | bool notify_sim = gSavedSettings.getBOOL("MiniMapNotifySimRange"); |
219 | // We show avatars outside the estate even if you can't manage it in case griefers are lying on the border | ||
220 | bool is_manager = gAgent.getRegion()->canManageEstate(); | ||
221 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 | 226 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 |
222 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | 227 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) |
223 | { | 228 | { |
@@ -286,7 +291,7 @@ void PanelRadar::updateRadarDisplay() | |||
286 | } | 291 | } |
287 | 292 | ||
288 | // Only display avatars in range | 293 | // Only display avatars in range |
289 | if (is_manager || entry->getDistance() <= range) | 294 | if (mSimWide || entry->getDistance() <= range) |
290 | { | 295 | { |
291 | // Append typing string | 296 | // Append typing string |
292 | std::string typing = ""; | 297 | std::string typing = ""; |
@@ -549,6 +554,28 @@ void PanelRadar::onUseRadarList(LLUICtrl* ctrl, void* user_data) | |||
549 | } | 554 | } |
550 | 555 | ||
551 | 556 | ||
557 | // static | ||
558 | void PanelRadar::onCheckSimWide(LLUICtrl* ctrl, void* user_data) | ||
559 | { | ||
560 | PanelRadar* self = (PanelRadar*)user_data; | ||
561 | if (self) | ||
562 | { | ||
563 | self->updateRangeControls(); | ||
564 | } | ||
565 | } | ||
566 | |||
567 | |||
568 | void PanelRadar::updateRangeControls() | ||
569 | { | ||
570 | LLSpinCtrl* near_me = getChild<LLSpinCtrl>("near_me_range"); | ||
571 | if (near_me) | ||
572 | { | ||
573 | near_me->setEnabled(!gSavedSettings.getBOOL("RadarSimWide")); | ||
574 | } | ||
575 | mSimWide = gSavedSettings.getBOOL("RadarSimWide"); | ||
576 | } | ||
577 | |||
578 | |||
552 | bool PanelRadar::visibleItemsSelected() const | 579 | bool PanelRadar::visibleItemsSelected() const |
553 | { | 580 | { |
554 | return (mRadarList->getFirstSelectedIndex() >= 0); | 581 | return (mRadarList->getFirstSelectedIndex() >= 0); |
diff --git a/linden/indra/newview/panelradar.h b/linden/indra/newview/panelradar.h index 59e6aff..4d53b56 100644 --- a/linden/indra/newview/panelradar.h +++ b/linden/indra/newview/panelradar.h | |||
@@ -77,6 +77,7 @@ private: | |||
77 | LLScrollListCtrl* mRadarList; | 77 | LLScrollListCtrl* mRadarList; |
78 | LLUUID mSelectedAvatar; | 78 | LLUUID mSelectedAvatar; |
79 | F32 mSelectedDistance; | 79 | F32 mSelectedDistance; |
80 | bool mSimWide; | ||
80 | 81 | ||
81 | bool visibleItemsSelected() const; | 82 | bool visibleItemsSelected() const; |
82 | bool isKickable(const LLUUID& agent_id); | 83 | bool isKickable(const LLUUID& agent_id); |
@@ -88,6 +89,8 @@ private: | |||
88 | 89 | ||
89 | static void onUseRadarList(LLUICtrl* ctrl, void* user_data); | 90 | static void onUseRadarList(LLUICtrl* ctrl, void* user_data); |
90 | static void onRangeChange(LLFocusableElement* focus, void* user_data); | 91 | static void onRangeChange(LLFocusableElement* focus, void* user_data); |
92 | static void onCheckSimWide(LLUICtrl* ctrl, void* user_data); | ||
93 | void updateRangeControls(); | ||
91 | 94 | ||
92 | static void onClickProfile(void* user_data); | 95 | static void onClickProfile(void* user_data); |
93 | static void onClickIM(void* user_data); | 96 | static void onClickIM(void* user_data); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml index 603f2d8..d02ff0d 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml | |||
@@ -40,13 +40,13 @@ | |||
40 | 0 avatars in | 40 | 0 avatars in |
41 | </text> | 41 | </text> |
42 | 42 | ||
43 | <slider name="near_me_range" label="" control_name="NearMeRange" | 43 | <spinner name="near_me_range" label="" control_name="NearMeRange" |
44 | bottom_delta="0" left_delta="62" width="110" height="15" | 44 | bottom_delta="0" left_delta="66" width="60" height="15" |
45 | follows="left|top" min_val="5" max_val="512" increment="1" | 45 | follows="left|top" min_val="5" increment="15" |
46 | initial_val="96" decimal_digits="0" /> | 46 | initial_val="96" decimal_digits="0" /> |
47 | 47 | ||
48 | <text name="meters" | 48 | <text name="meters" |
49 | bottom_delta="0" left="180" height="15" width="40" | 49 | bottom_delta="0" left="140" height="15" width="40" |
50 | h_pad="0" halign="left" v_pad="0" follows="left|top" | 50 | h_pad="0" halign="left" v_pad="0" follows="left|top" |
51 | bg_visible="false" border_drop_shadow_visible="false" | 51 | bg_visible="false" border_drop_shadow_visible="false" |
52 | border_visible="false" drop_shadow_visible="true" | 52 | border_visible="false" drop_shadow_visible="true" |
@@ -54,6 +54,12 @@ | |||
54 | m | 54 | m |
55 | </text> | 55 | </text> |
56 | 56 | ||
57 | <check_box bottom_delta="-1" enabled="true" follows="left|top" | ||
58 | font="SansSerifSmall" height="16" initial_value="false" | ||
59 | label="Sim-wide" left_delta="20" mouse_opaque="true" | ||
60 | name="simwide_checkbox" control_name="RadarSimWide" | ||
61 | radio_style="false" width="100" /> | ||
62 | |||
57 | <tab_container name="radar_tab_container" | 63 | <tab_container name="radar_tab_container" |
58 | bottom="1" left="0" right="0" height="172" | 64 | bottom="1" left="0" right="0" height="172" |
59 | follows="left|right|bottom" border="false" | 65 | follows="left|right|bottom" border="false" |