summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingconsole.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-01-31 16:30:16 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-01-31 16:30:16 -0800
commita376d6314d0ce2a15858d2890534a8a010f0c5eb (patch)
tree2152a306843ea97d49d02d252492454f0f9f48a3 /indra/newview/llfloaterpathfindingconsole.cpp
parent9e1479d610af1edd799a790ff18155fbb6ec5c89 (diff)
PATH-243: Refactoring the implementation for the render mode buttons on the console. Removing the warning messages for methods that now have implementations.
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp65
1 files changed, 42 insertions, 23 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 6c5e1f1f4b..a39869eddd 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -445,7 +445,7 @@ void LLFloaterPathfindingConsole::onShowExcludeVolumesToggle()
LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
if (llPathingLibInstance != NULL)
{
- llPathingLibInstance->setRenderNavMeshandShapes(checkBoxValue);
+ llPathingLibInstance->setRenderShapes(checkBoxValue);
}
else
{
@@ -458,15 +458,33 @@ void LLFloaterPathfindingConsole::onShowPathToggle()
{
BOOL checkBoxValue = mShowPathCheckBox->get();
- llwarns << "functionality has not yet been implemented to toggle '"
- << mShowPathCheckBox->getLabel() << "' to "
- << (checkBoxValue ? "ON" : "OFF") << llendl;
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ llPathingLibInstance->setRenderPath(checkBoxValue);
+ }
+ else
+ {
+ mShowPathCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
}
void LLFloaterPathfindingConsole::onShowWaterPlaneToggle()
{
BOOL checkBoxValue = mShowWaterPlaneCheckBox->get();
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
+ {
+ llPathingLibInstance->setRenderWaterPlane(checkBoxValue);
+ }
+ else
+ {
+ mShowWaterPlaneCheckBox->set(FALSE);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
+ }
+
llwarns << "functionality has not yet been implemented to toggle '"
<< mShowWaterPlaneCheckBox->getLabel() << "' to "
<< (checkBoxValue ? "ON" : "OFF") << llendl;
@@ -474,21 +492,27 @@ void LLFloaterPathfindingConsole::onShowWaterPlaneToggle()
void LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch()
{
- switch (getRegionOverlayDisplay())
+ LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance();
+ if (llPathingLibInstance != NULL)
{
- case kRenderOverlayOnFixedPhysicsGeometry :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mRegionOverlayDisplayRadioGroup->getName() << "' to RenderOverlayOnFixedPhysicsGeometry"
- << llendl;
- break;
- case kRenderOverlayOnAllRenderableGeometry :
- llwarns << "functionality has not yet been implemented to toggle '"
- << mRegionOverlayDisplayRadioGroup->getName() << "' to RenderOverlayOnAllRenderableGeometry"
- << llendl;
- break;
- default :
- llassert(0);
- break;
+ switch (getRegionOverlayDisplay())
+ {
+ case kRenderOverlayOnFixedPhysicsGeometry :
+ llPathingLibInstance->setRenderOverlayMode(false);
+ break;
+ case kRenderOverlayOnAllRenderableGeometry :
+ llPathingLibInstance->setRenderOverlayMode(true);
+ break;
+ default :
+ llPathingLibInstance->setRenderOverlayMode(false);
+ llassert(0);
+ break;
+ }
+ }
+ else
+ {
+ this->setRegionOverlayDisplay(kRenderOverlayOnFixedPhysicsGeometry);
+ llwarns << "cannot find LLPathingLib instance" << llendl;
}
}
@@ -599,11 +623,6 @@ void LLFloaterPathfindingConsole::onTerrainMaterialDSet()
}
-BOOL LLFloaterPathfindingConsole::allowAllRenderables() const
-{
- return getRegionOverlayDisplay() == kRenderOverlayOnAllRenderableGeometry ? true : false;
-}
-
void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, const LLVector3& point2 )
{
switch (getPathSelectionState())