summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-06-27 13:30:01 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-06-27 13:30:01 -0700
commit01545997da201e04731b14eb720765a19470974d (patch)
tree297b386d3e27b7afdc94443733749450e711a5c4 /indra
parenta818cd4f7336ed9b33dacd91fcaf5239a8be813d (diff)
PATH-788: Adding more state information for the rebake region button to capture and display the rebaking states. Also, altering how the stop flying button works so that it does not hide the entire panel.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmoveview.cpp2
-rw-r--r--indra/newview/llpanelpathfindingrebakenavmesh.cpp38
-rw-r--r--indra/newview/llpanelpathfindingrebakenavmesh.h2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml18
5 files changed, 63 insertions, 9 deletions
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 65c73bb0ec..93f7146fc8 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -686,7 +686,7 @@ void LLPanelStandStopFlying::onStopFlyingButtonClick()
gAgent.setFlying(FALSE);
setFocus(FALSE); // EXT-482
- setVisible(FALSE);
+ mStopFlyingButton->setVisible(FALSE);
}
/**
diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.cpp b/indra/newview/llpanelpathfindingrebakenavmesh.cpp
index 4f7b3aa330..f423b5891f 100644
--- a/indra/newview/llpanelpathfindingrebakenavmesh.cpp
+++ b/indra/newview/llpanelpathfindingrebakenavmesh.cpp
@@ -59,13 +59,18 @@ LLPanelPathfindingRebakeNavmesh* LLPanelPathfindingRebakeNavmesh::getInstance()
BOOL LLPanelPathfindingRebakeNavmesh::postBuild()
{
- //Rebake initiated
+ //Rebake button
mNavMeshRebakeButton = findChild<LLButton>("navmesh_btn");
llassert(mNavMeshRebakeButton != NULL);
mNavMeshRebakeButton->setCommitCallback(boost::bind(&LLPanelPathfindingRebakeNavmesh::onNavMeshRebakeClick, this));
LLHints::registerHintTarget("navmesh_btn", mNavMeshRebakeButton->getHandle());
- //Baking...
+ //Sending rebake request
+ mNavMeshSendingButton = findChild<LLButton>("navmesh_btn_sending");
+ llassert(mNavMeshSendingButton != NULL);
+ LLHints::registerHintTarget("navmesh_btn_sending", mNavMeshSendingButton->getHandle());
+
+ //rebaking...
mNavMeshBakingButton = findChild<LLButton>("navmesh_btn_baking");
llassert(mNavMeshBakingButton != NULL);
LLHints::registerHintTarget("navmesh_btn_baking", mNavMeshBakingButton->getHandle());
@@ -105,14 +110,24 @@ BOOL LLPanelPathfindingRebakeNavmesh::handleToolTip( S32 x, S32 y, MASK mask )
{
LLToolTipMgr::instance().show(mNavMeshRebakeButton->getToolTip());
}
+ else if (mNavMeshSendingButton->getVisible())
+ {
+ LLToolTipMgr::instance().show(mNavMeshSendingButton->getToolTip());
+ }
+ else if (mNavMeshBakingButton->getVisible())
+ {
+ LLToolTipMgr::instance().show(mNavMeshBakingButton->getToolTip());
+ }
return LLPanel::handleToolTip(x, y, mask);
}
LLPanelPathfindingRebakeNavmesh::LLPanelPathfindingRebakeNavmesh()
- : mCanRebakeRegion(FALSE),
+ : LLPanel(),
+ mCanRebakeRegion(FALSE),
mRebakeNavMeshMode(kRebakeNavMesh_Default),
mNavMeshRebakeButton(NULL),
+ mNavMeshSendingButton(NULL),
mNavMeshBakingButton(NULL),
mNavMeshSlot(),
mRegionCrossingSlot(),
@@ -142,7 +157,8 @@ void LLPanelPathfindingRebakeNavmesh::setMode(ERebakeNavMeshMode pRebakeNavMeshM
LLNotificationsUtil::add("PathfindingRebakeNavmesh");
}
mNavMeshRebakeButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_Available);
- mNavMeshBakingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_RequestSent);
+ mNavMeshSendingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_RequestSent);
+ mNavMeshBakingButton->setVisible(pRebakeNavMeshMode == kRebakeNavMesh_InProgress);
mRebakeNavMeshMode = pRebakeNavMeshMode;
}
@@ -159,7 +175,17 @@ void LLPanelPathfindingRebakeNavmesh::handleAgentState(BOOL pCanRebakeRegion)
void LLPanelPathfindingRebakeNavmesh::handleRebakeNavMeshResponse(bool pResponseStatus)
{
- setMode(pResponseStatus ? kRebakeNavMesh_NotAvailable : kRebakeNavMesh_Available);
+ setMode(pResponseStatus ? kRebakeNavMesh_InProgress : kRebakeNavMesh_Default);
+ if (!pResponseStatus)
+ {
+ LLNotificationsUtil::add("PathfindingCannotRebakeNavmesh");
+ }
+
+ LLViewerRegion *currentRegion = gAgent.getRegion();
+ if (currentRegion != NULL)
+ {
+ LLPathfindingManager::getInstance()->requestGetNavMeshForRegion(currentRegion, true);
+ }
}
void LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNavMeshStatus &pNavMeshStatus)
@@ -174,6 +200,8 @@ void LLPanelPathfindingRebakeNavmesh::handleNavMeshStatus(const LLPathfindingNav
rebakeNavMeshMode = kRebakeNavMesh_Available;
break;
case LLPathfindingNavMeshStatus::kBuilding :
+ rebakeNavMeshMode = kRebakeNavMesh_InProgress;
+ break;
case LLPathfindingNavMeshStatus::kComplete :
rebakeNavMeshMode = kRebakeNavMesh_NotAvailable;
break;
diff --git a/indra/newview/llpanelpathfindingrebakenavmesh.h b/indra/newview/llpanelpathfindingrebakenavmesh.h
index f81c030c35..a77cddbc50 100644
--- a/indra/newview/llpanelpathfindingrebakenavmesh.h
+++ b/indra/newview/llpanelpathfindingrebakenavmesh.h
@@ -59,6 +59,7 @@ private:
{
kRebakeNavMesh_Available,
kRebakeNavMesh_RequestSent,
+ kRebakeNavMesh_InProgress,
kRebakeNavMesh_NotAvailable,
kRebakeNavMesh_Default = kRebakeNavMesh_NotAvailable
} ERebakeNavMeshMode;
@@ -86,6 +87,7 @@ private:
ERebakeNavMeshMode mRebakeNavMeshMode;
LLButton* mNavMeshRebakeButton;
+ LLButton* mNavMeshSendingButton;
LLButton* mNavMeshBakingButton;
LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index b09fb7bbe8..ea06e3a321 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5853,6 +5853,18 @@ This area has building disabled. You can&apos;t build or rez objects here.
</notification>
<notification
+ icon="alertmodal.tga"
+ name="PathfindingCannotRebakeNavmesh"
+ type="alertmodal">
+ <unique/>
+ You are not allowed to rebake the navmesh at the current time.
+ <usetemplate
+ name="okbutton"
+ yestext="OK"
+ />
+ </notification>
+
+ <notification
icon="notify.tga"
name="SeeAvatars"
persist="true"
diff --git a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
index c7bf91efb4..ddfba4c43d 100644
--- a/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
+++ b/indra/newview/skins/default/xui/en/panel_navmesh_rebake.xml
@@ -17,7 +17,19 @@
top="2"
visible="false"
enabled="true"
- width="113" />
+ width="120" />
+ <button
+ follows="left|bottom"
+ height="19"
+ label="Sending rebake request"
+ layout="topleft"
+ left="10"
+ name="navmesh_btn_sending"
+ tool_tip="Sending rebake request"
+ top="2"
+ visible="false"
+ enabled="false"
+ width="120" />
<button
follows="left|bottom"
height="19"
@@ -25,10 +37,10 @@
layout="topleft"
left="10"
name="navmesh_btn_baking"
- tool_tip="Region is cleaning up."
+ tool_tip="Region is cleaning."
top="2"
visible="false"
enabled="false"
- width="113" />
+ width="120" />
</panel>