diff options
Diffstat (limited to 'linden/indra/newview/panelradar.cpp')
-rw-r--r-- | linden/indra/newview/panelradar.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
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); |