From 2400b8a651e5aec599c2132d3cf9c12b78b21d83 Mon Sep 17 00:00:00 2001 From: prep <prep@lindenlab.com> Date: Mon, 11 Jun 2012 17:46:39 -0400 Subject: [PATCH] WIP:path-703 Adding icon to slurl bar to indicate if dynamic pathfinding is enabled or disbled. --- indra/newview/lllocationinputctrl.cpp | 20 ++++++++++++++---- indra/newview/lllocationinputctrl.h | 7 ++++-- indra/newview/llviewerregion.cpp | 6 ++++++ indra/newview/llviewerregion.h | 3 +++ .../textures/icons/Pathfinding_Dynamic.png | Bin 0 -> 683 bytes .../skins/default/textures/textures.xml | 2 ++ .../newview/skins/default/xui/en/strings.xml | 2 +- .../default/xui/en/widgets/location_input.xml | 9 ++++++++ 8 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 025181ead55..a6b0f5b81c6 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -191,7 +191,8 @@ LLLocationInputCtrl::Params::Params() damage_icon("damage_icon"), damage_text("damage_text"), see_avatars_icon("see_avatars_icon"), - maturity_help_topic("maturity_help_topic") + maturity_help_topic("maturity_help_topic"), + pathfinding_dynamic_icon("pathfinding_dynamic_icon") { } @@ -270,7 +271,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) if (p.icon_maturity_general()) { mIconMaturityGeneral = p.icon_maturity_general; - } + } if (p.icon_maturity_adult()) { mIconMaturityAdult = p.icon_maturity_adult; @@ -279,7 +280,7 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) { mIconMaturityModerate = p.icon_maturity_moderate; } - + LLButton::Params maturity_button = p.maturity_button; mMaturityButton = LLUICtrlFactory::create<LLButton>(maturity_button); addChild(mMaturityButton); @@ -336,7 +337,14 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mParcelIcon[DAMAGE_ICON] = LLUICtrlFactory::create<LLIconCtrl>(damage_icon); mParcelIcon[DAMAGE_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, DAMAGE_ICON)); addChild(mParcelIcon[DAMAGE_ICON]); - + + LLIconCtrl::Params pathfinding_dynamic_icon = p.pathfinding_dynamic_icon; + pathfinding_dynamic_icon.tool_tip = LLTrans::getString("PathfindingDynamicTooltip"); + pathfinding_dynamic_icon.mouse_opaque = true; + mParcelIcon[PATHFINDING_DYNAMIC] = LLUICtrlFactory::create<LLIconCtrl>(pathfinding_dynamic_icon); + mParcelIcon[PATHFINDING_DYNAMIC]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PATHFINDING_DYNAMIC)); + addChild(mParcelIcon[PATHFINDING_DYNAMIC]); + LLTextBox::Params damage_text = p.damage_text; damage_text.tool_tip = LLTrans::getString("LocationCtrlDamageTooltip"); damage_text.mouse_opaque = true; @@ -819,6 +827,7 @@ void LLLocationInputCtrl::refreshParcelIcons() bool allow_scripts = vpm->allowAgentScripts(agent_region, current_parcel); bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); bool see_avs = current_parcel->getSeeAVs(); + bool pathfinding_dynamic = true;// gAgent.getRegion()->dynamicPathfindingEnabled(); // Most icons are "block this ability" mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); @@ -827,6 +836,9 @@ void LLLocationInputCtrl::refreshParcelIcons() mParcelIcon[BUILD_ICON]->setVisible( !allow_build ); mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); + //prep# + mParcelIcon[PATHFINDING_DYNAMIC]->setVisible( pathfinding_dynamic ); + mDamageText->setVisible(allow_damage); mParcelIcon[SEE_AVATARS_ICON]->setVisible( !see_avs ); diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index ed47ba73e3f..e0073693103 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -78,7 +78,8 @@ class LLLocationInputCtrl build_icon, scripts_icon, damage_icon, - see_avatars_icon; + see_avatars_icon, + pathfinding_dynamic_icon; Optional<LLTextBox::Params> damage_text; Params(); }; @@ -116,7 +117,8 @@ class LLLocationInputCtrl SCRIPTS_ICON, // 4 DAMAGE_ICON, // 5 SEE_AVATARS_ICON, // 6 - ICON_COUNT // 7 total + PATHFINDING_DYNAMIC,// 7 + ICON_COUNT // 8 total }; friend class LLUICtrlFactory; @@ -184,6 +186,7 @@ class LLLocationInputCtrl LLPointer<LLUIImage> mIconMaturityGeneral; LLPointer<LLUIImage> mIconMaturityAdult; LLPointer<LLUIImage> mIconMaturityModerate; + LLPointer<LLUIImage> mIconPathfindingDynamic; std::string mAddLandmarkTooltip; std::string mEditLandmarkTooltip; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 243231c65a9..a7617b10284 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1151,6 +1151,7 @@ void LLViewerRegion::getInfo(LLSD& info) void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) { sim_features = mSimulatorFeatures; + } void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) @@ -1836,4 +1837,9 @@ bool LLViewerRegion::meshRezEnabled() const mSimulatorFeatures["MeshRezEnabled"].asBoolean()); } +bool LLViewerRegion::dynamicPathfindingEnabled() const +{ + return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") && + mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean()); +} diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index 6004165b0e3..7bf53ba5428 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -285,6 +285,9 @@ class LLViewerRegion: public LLCapabilityProvider // implements this interface void getSimulatorFeatures(LLSD& info); void setSimulatorFeatures(const LLSD& info); + + bool dynamicPathfindingEnabled() const; + typedef enum { CACHE_MISS_TYPE_FULL = 0, diff --git a/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png b/indra/newview/skins/default/textures/icons/Pathfinding_Dynamic.png new file mode 100644 index 0000000000000000000000000000000000000000..2c485aef0dd2dc566e4463ee15f8690c8aaa30e4 GIT binary patch literal 683 zcmV;c0#yBpP)<h;3K|Lk000e1NJLTq000gE000dL0ssI27QV<R00007bV*G`2iyh= z6(~9B+(T>t000SaNLh0L03N{r03N{s!)a7g00004XF*Lt006O%3;baP0006yNkl<Z zc-jFk0?_>d`T6+-1O)&8|KaE4QcqCu>*_i-HUs|r&(hKM{Qdp^1eTVTMn*;h0|Nx- z=jRX*5DE$lnU9eX{oQ3%6*4B+2?Y4uGzhc9^V8o2ARiz9|NsC0{sZ~)@~5q`_x1PM z!<mb62RbAF3=IYh1^Xu-1xYsi1O^6(k*?zB_bVzN0bW;EzsAWL4e+CY6bldiq^<k1 z!}0a}1uY#0c3BS|8~BE%{jR|SB_=2WUu9wm1OiY#5FH8ss<Hl@xBKMw8TI!P$=M5a zm*?~Q1zkuB2?Fug+1&yvEi4rg4>2VG`2z*A!tnY44ig0HC>s0!1@zhP4A9Z`9uWT^ zAr5waa{><!4>>nB2?qW5|N8U!{r>>~7#0XFFckm)`~Ls|`Sb+={{H*@`5_`60=Bia z(ACu7=?4z~|1%>70sr{a=LD~`=l}Z}3IXsSE(7`g2khzj!Mnr*-PYIW>Ff6M^-4Sl zAt4OX(CqT}3-$y54+ZXSOAbCS0lUoux5)bZ{R9KSy1UBH(b?SX3JL}}FZfJ37$O<^ zI41vOP!UEi`{D2jf1m2=`49vG_yPU;`t<hqr>3a3uc0y^=2}Az84v9N{RH;`3B%F@ zlBnu3LRwByRH>(=0sZ~`|NsB}{{E$@s)KuS76|(t6$l3k{^jWT=kWyq3K_DotRW#F z{{H>~0RaI3008><`MtBY0s#&G4k!;NPDfyp_X{)n01<L*VId(O0s;aC1_ot15|QMe R8Ib@0002ovPDHLkV1mC3Frfed literal 0 HcmV?d00001 diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index d5d58235a45..1b104bb7664 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -433,6 +433,8 @@ with the same filename but different name <texture name="Parcel_Voice_Light" file_name="icons/Parcel_Voice_Light.png" preload="false" /> <texture name="Parcel_VoiceNo_Light" file_name="icons/Parcel_VoiceNo_Light.png" preload="false" /> + <texture name="Pathfinding_Dynamic" file_name="icons/Pathfinding_Dynamic.png" preload="false" /> + <texture name="Pause_Off" file_name="icons/Pause_Off.png" preload="false" /> <texture name="Pause_Over" file_name="icons/Pause_Over.png" preload="false" /> <texture name="Pause_Press" file_name="icons/Pause_Press.png" preload="false" /> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 84532c4c2bf..15963af9608 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3325,7 +3325,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="LocationCtrlModerateIconTooltip">Moderate Region</string> <string name="LocationCtrlGeneralIconTooltip">General Region</string> <string name="LocationCtrlSeeAVsTooltip">Avatars visible and chat allowed outside of this parcel</string> - + <string name="PathfindingDynamicTooltip">Dynamic Pathfinding Enabled</string> <!-- Strings used by the (currently Linux) auto-updater app --> <string name="UpdaterWindowTitle"> [APP_NAME] Update diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 44436fb6f27..a9cb5f83edc 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -112,6 +112,15 @@ follows="right|top" image_name="Parcel_Health_Dark" /> + <pathfinding_dynamic_icon + name="pathfinding_dynamic_icon" + width="14" + height="13" + top="19" + left="2" + follows="right|top" + image_name="Pathfinding_Dynamic" + /> <!-- Default text color is invisible on top of nav bar background --> <damage_text name="damage_text" -- GitLab