summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationinputctrl.cpp
diff options
context:
space:
mode:
authorprep <none@none>2012-06-12 11:23:31 -0400
committerprep <none@none>2012-06-12 11:23:31 -0400
commita45310e2af0abdcdb7a5d0ade1bd3c66af3dfae1 (patch)
tree9b0f1f93bdeb33d32525eb4d9a4b1df5946f67f4 /indra/newview/lllocationinputctrl.cpp
parent42f3648814923edad8a040620cb3db233597cbb9 (diff)
Path-702: Added notification message and hooked up onparcelclick.
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r--indra/newview/lllocationinputctrl.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 6d1b6f89f6..db7371d993 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -341,8 +341,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
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);
- addChild(mParcelIcon[PATHFINDING_DYNAMIC]);
+ mParcelIcon[PATHFINDING_DYNAMIC_ICON] = LLUICtrlFactory::create<LLIconCtrl>(pathfinding_dynamic_icon);
+ mParcelIcon[PATHFINDING_DYNAMIC_ICON]->setMouseDownCallback(boost::bind(&LLLocationInputCtrl::onParcelIconClick, this, PATHFINDING_DYNAMIC_ICON));
+ addChild(mParcelIcon[PATHFINDING_DYNAMIC_ICON]);
LLTextBox::Params damage_text = p.damage_text;
damage_text.tool_tip = LLTrans::getString("LocationCtrlDamageTooltip");
@@ -826,7 +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();
+ bool pathfinding_dynamic = gAgent.getRegion()->dynamicPathfindingEnabled();
// Most icons are "block this ability"
mParcelIcon[VOICE_ICON]->setVisible( !allow_voice );
@@ -835,8 +836,7 @@ 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 );
+ mParcelIcon[PATHFINDING_DYNAMIC_ICON]->setVisible( pathfinding_dynamic );
mDamageText->setVisible(allow_damage);
mParcelIcon[SEE_AVATARS_ICON]->setVisible( !see_avs );
@@ -1176,6 +1176,9 @@ void LLLocationInputCtrl::onParcelIconClick(EParcelIcon icon)
case BUILD_ICON:
LLNotificationsUtil::add("NoBuild");
break;
+ case PATHFINDING_DYNAMIC_ICON:
+ LLNotificationsUtil::add("PathfindingDynamic");
+ break;
case SCRIPTS_ICON:
{
LLViewerRegion* region = gAgent.getRegion();
@@ -1199,9 +1202,6 @@ 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