summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpathfindingconsole.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2011-12-19 14:29:10 -0800
committerTodd Stinson <stinson@lindenlab.com>2011-12-19 14:29:10 -0800
commit11bb14fe029a6764717475cdf53bb6eed8c1f9c9 (patch)
treec24d038a8ab2f6795e9a0bb6a2417d93b28716ec /indra/newview/llfloaterpathfindingconsole.cpp
parentd2fbaca570c26142b65c784554b69567dea6a8f0 (diff)
Stubbing out functionality for catching the overlay display render state switch.
Diffstat (limited to 'indra/newview/llfloaterpathfindingconsole.cpp')
-rw-r--r--indra/newview/llfloaterpathfindingconsole.cpp53
1 files changed, 49 insertions, 4 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index a7195fee83..f713b09e88 100644
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -33,6 +33,7 @@
#include "llagent.h"
#include "llbutton.h"
#include "llcheckboxctrl.h"
+#include "llradiogroup.h"
#include "llnavmeshstation.h"
#include "llviewerregion.h"
@@ -62,6 +63,10 @@ BOOL LLFloaterPathfindingConsole::postBuild()
llassert(mShowWaterPlaneCheckBox != NULL);
mShowWaterPlaneCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWaterPlaneToggle, this));
+ mRegionOverlayDisplayRadioGroup = findChild<LLRadioGroup>("region_overlay_display");
+ llassert(mRegionOverlayDisplayRadioGroup != NULL);
+ mRegionOverlayDisplayRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch, this));
+
return LLFloater::postBuild();
}
@@ -71,6 +76,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed)
mShowExcludeVolumesCheckBox(NULL),
mShowPathCheckBox(NULL),
mShowWaterPlaneCheckBox(NULL),
+ mRegionOverlayDisplayRadioGroup(NULL),
mNavmeshDownloadObserver()
{
}
@@ -150,8 +156,8 @@ void LLFloaterPathfindingConsole::onShowPathToggle()
BOOL checkBoxValue = mShowPathCheckBox->get();
llwarns << "functionality has not yet been implemented to toggle '"
- << mShowPathCheckBox->getLabel() << "' to "
- << (checkBoxValue ? "ON" : "OFF") << llendl;
+ << mShowPathCheckBox->getLabel() << "' to "
+ << (checkBoxValue ? "ON" : "OFF") << llendl;
}
void LLFloaterPathfindingConsole::onShowWaterPlaneToggle()
@@ -159,11 +165,50 @@ void LLFloaterPathfindingConsole::onShowWaterPlaneToggle()
BOOL checkBoxValue = mShowWaterPlaneCheckBox->get();
llwarns << "functionality has not yet been implemented to toggle '"
- << mShowWaterPlaneCheckBox->getLabel() << "' to "
- << (checkBoxValue ? "ON" : "OFF") << llendl;
+ << mShowWaterPlaneCheckBox->getLabel() << "' to "
+ << (checkBoxValue ? "ON" : "OFF") << llendl;
+}
+
+void LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch()
+{
+ switch (getRegionOverlayDisplay())
+ {
+ 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;
+ }
}
void LLFloaterPathfindingConsole::onViewEditLinksetClicked()
{
LLFloaterPathfindingLinksets::openLinksetsEditor();
}
+
+LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole::getRegionOverlayDisplay() const
+{
+ ERegionOverlayDisplay regionOverlayDisplay;
+ switch (mRegionOverlayDisplayRadioGroup->getSelectedIndex())
+ {
+ case 0 :
+ regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
+ break;
+ case 1:
+ regionOverlayDisplay = kRenderOverlayOnAllRenderableGeometry;
+ break;
+ default :
+ regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry;
+ break;
+ }
+
+ return regionOverlayDisplay;
+}