summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingconsole.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-02-14 16:52:54 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-02-14 16:52:54 -0800
commitd2bd4e4d108acae5473c28936b04bd19055e97e8 (patch)
tree6ca8a91be364888285312c2fba45436d58cbd7ca /indra/newview/llfloaterpathfindingconsole.cpp
parente5d59b3c2ae99c7e6cfb0312dd8842e8d948aad0 (diff)
PATH-284: Adding functionality for the Clear Path button.
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp97
1 files changed, 52 insertions, 45 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 26e1ff3963..e46a454e70 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -65,6 +65,7 @@ BOOL LLFloaterPathfindingConsole::postBuild()
{
childSetAction("view_characters_floater", boost::bind(&LLFloaterPathfindingConsole::onViewCharactersClicked, this));
childSetAction("view_and_edit_linksets", boost::bind(&LLFloaterPathfindingConsole::onViewEditLinksetClicked, this));
+ childSetAction("clear_path", boost::bind(&LLFloaterPathfindingConsole::onClearPathClicked, this));
mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh");
llassert(mShowNavMeshCheckBox != NULL);
@@ -164,56 +165,56 @@ BOOL LLFloaterPathfindingConsole::isRenderNavMesh() const
return mShowNavMeshCheckBox->get();
}
-void LLFloaterPathfindingConsole::setRenderNavMesh(BOOL pIsRenderNavMesh)
-{
- mShowNavMeshCheckBox->set(pIsRenderNavMesh);
-}
-
-BOOL LLFloaterPathfindingConsole::isRenderWalkables() const
-{
- return mShowWalkablesCheckBox->get();
-}
-
-void LLFloaterPathfindingConsole::setRenderWalkables(BOOL pIsRenderWalkables)
-{
- mShowWalkablesCheckBox->set(pIsRenderWalkables);
-}
-
-BOOL LLFloaterPathfindingConsole::isRenderStaticObstacles() const
-{
- return mShowStaticObstaclesCheckBox->get();
-}
-
-void LLFloaterPathfindingConsole::setRenderStaticObstacles(BOOL pIsRenderStaticObstacles)
-{
- mShowStaticObstaclesCheckBox->set(pIsRenderStaticObstacles);
-}
-
-BOOL LLFloaterPathfindingConsole::isRenderMaterialVolumes() const
-{
- return mShowMaterialVolumesCheckBox->get();
-}
-
-void LLFloaterPathfindingConsole::setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes)
-{
- mShowMaterialVolumesCheckBox->set(pIsRenderMaterialVolumes);
-}
-
-BOOL LLFloaterPathfindingConsole::isRenderExclusionVolumes() const
-{
- return mShowExclusionVolumesCheckBox->get();
-}
-
+void LLFloaterPathfindingConsole::setRenderNavMesh(BOOL pIsRenderNavMesh)
+{
+ mShowNavMeshCheckBox->set(pIsRenderNavMesh);
+}
+
+BOOL LLFloaterPathfindingConsole::isRenderWalkables() const
+{
+ return mShowWalkablesCheckBox->get();
+}
+
+void LLFloaterPathfindingConsole::setRenderWalkables(BOOL pIsRenderWalkables)
+{
+ mShowWalkablesCheckBox->set(pIsRenderWalkables);
+}
+
+BOOL LLFloaterPathfindingConsole::isRenderStaticObstacles() const
+{
+ return mShowStaticObstaclesCheckBox->get();
+}
+
+void LLFloaterPathfindingConsole::setRenderStaticObstacles(BOOL pIsRenderStaticObstacles)
+{
+ mShowStaticObstaclesCheckBox->set(pIsRenderStaticObstacles);
+}
+
+BOOL LLFloaterPathfindingConsole::isRenderMaterialVolumes() const
+{
+ return mShowMaterialVolumesCheckBox->get();
+}
+
+void LLFloaterPathfindingConsole::setRenderMaterialVolumes(BOOL pIsRenderMaterialVolumes)
+{
+ mShowMaterialVolumesCheckBox->set(pIsRenderMaterialVolumes);
+}
+
+BOOL LLFloaterPathfindingConsole::isRenderExclusionVolumes() const
+{
+ return mShowExclusionVolumesCheckBox->get();
+}
+
void LLFloaterPathfindingConsole::setRenderExclusionVolumes(BOOL pIsRenderExclusionVolumes)
{
mShowExclusionVolumesCheckBox->set(pIsRenderExclusionVolumes);
}
-BOOL LLFloaterPathfindingConsole::isRenderWorld() const
-{
- return mShowWorldCheckBox->get();
-}
-
+BOOL LLFloaterPathfindingConsole::isRenderWorld() const
+{
+ return mShowWorldCheckBox->get();
+}
+
void LLFloaterPathfindingConsole::setRenderWorld(BOOL pIsRenderWorld)
{
mShowWorldCheckBox->set(pIsRenderWorld);
@@ -462,6 +463,12 @@ void LLFloaterPathfindingConsole::onViewEditLinksetClicked()
LLFloaterPathfindingLinksets::openLinksetsEditor();
}
+void LLFloaterPathfindingConsole::onClearPathClicked()
+{
+ mHasStartPoint = false;
+ mHasEndPoint = false;
+}
+
void LLFloaterPathfindingConsole::generatePath()
{
if (mHasStartPoint && mHasEndPoint)