From 2400b8a651e5aec599c2132d3cf9c12b78b21d83 Mon Sep 17 00:00:00 2001 From: prep Date: Mon, 11 Jun 2012 17:46:39 -0400 Subject: WIP:path-703 Adding icon to slurl bar to indicate if dynamic pathfinding is enabled or disbled. --- indra/newview/lllocationinputctrl.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 025181ead5..a6b0f5b81c 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(maturity_button); addChild(mMaturityButton); @@ -336,7 +337,14 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mParcelIcon[DAMAGE_ICON] = LLUICtrlFactory::create(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(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 ); -- cgit v1.2.3 From eb74acb28ef26c4cacc9f58a12ece780617cb960 Mon Sep 17 00:00:00 2001 From: prep Date: Mon, 11 Jun 2012 18:09:40 -0400 Subject: removed callback for dynamic pathfinding notification --- indra/newview/lllocationinputctrl.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index a6b0f5b81c..34573d7211 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -342,7 +342,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) pathfinding_dynamic_icon.tool_tip = LLTrans::getString("PathfindingDynamicTooltip"); pathfinding_dynamic_icon.mouse_opaque = true; mParcelIcon[PATHFINDING_DYNAMIC] = LLUICtrlFactory::create(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; -- cgit v1.2.3 From e05d70174ce269c1e525acfdccf6326eb4d5dd54 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 11 Jun 2012 17:51:28 -0700 Subject: PATH-725: BUILDFIX Correcting a problem with Linux and Mac builds. --- indra/newview/lllocationinputctrl.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/lllocationinputctrl.cpp') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 34573d7211..6d1b6f89f6 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -1199,6 +1199,9 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon) case SEE_AVATARS_ICON: LLNotificationsUtil::add("SeeAvatars"); break; + case PATHFINDING_DYNAMIC: + // prep TODO : add something here + break; case ICON_COUNT: break; // no default to get compiler warning when a new icon gets added -- cgit v1.2.3