From 6a078814cdd55105304fec41712dbd635e18d900 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 19 Dec 2011 17:01:23 -0800 Subject: Stubbing out functionality for catching the character type switch states. --- indra/newview/llfloaterpathfindingconsole.cpp | 74 ++++++++++++++++++++-- indra/newview/llfloaterpathfindingconsole.h | 11 ++++ .../default/xui/en/floater_pathfinding_console.xml | 21 +++--- 3 files changed, 93 insertions(+), 13 deletions(-) diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index f045eba19b..c6613e4035 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -76,6 +76,10 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mCharacterWidthSlider != NULL); mCharacterWidthSlider->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterWidthSet, this)); + mCharacterTypeRadioGroup = findChild("character_type"); + llassert(mCharacterTypeRadioGroup != NULL); + mCharacterTypeRadioGroup ->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterTypeSwitch, this)); + return LLFloater::postBuild(); } @@ -88,6 +92,7 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mRegionOverlayDisplayRadioGroup(NULL), mPathSelectionRadioGroup(NULL), mCharacterWidthSlider(NULL), + mCharacterTypeRadioGroup(NULL), mNavmeshDownloadObserver() { } @@ -228,8 +233,39 @@ void LLFloaterPathfindingConsole::onPathSelectionSwitch() void LLFloaterPathfindingConsole::onCharacterWidthSet() { F32 characterWidth = getCharacterWidth(); - llwarns << "functionality has not yet been implemented to set " << mCharacterWidthSlider->getName() - << " to the value (" << characterWidth << ")" << llendl; + llwarns << "functionality has not yet been implemented to set '" << mCharacterWidthSlider->getName() + << "' to the value (" << characterWidth << ")" << llendl; +} + +void LLFloaterPathfindingConsole::onCharacterTypeSwitch() +{ + switch (getCharacterType()) + { + case kCharacterTypeA : + llwarns << "functionality has not yet been implemented to toggle '" + << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeA" + << llendl; + break; + case kCharacterTypeB : + llwarns << "functionality has not yet been implemented to toggle '" + << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeB" + << llendl; + break; + case kCharacterTypeC : + llwarns << "functionality has not yet been implemented to toggle '" + << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeC" + << llendl; + break; + case kCharacterTypeD : + llwarns << "functionality has not yet been implemented to toggle '" + << mCharacterTypeRadioGroup->getName() << "' to CharacterTypeD" + << llendl; + break; + default : + llassert(0); + break; + } + } void LLFloaterPathfindingConsole::onViewEditLinksetClicked() @@ -242,14 +278,15 @@ LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole:: ERegionOverlayDisplay regionOverlayDisplay; switch (mRegionOverlayDisplayRadioGroup->getValue().asInteger()) { - case 0 : + case 1 : regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry; break; - case 1: + case 2: regionOverlayDisplay = kRenderOverlayOnAllRenderableGeometry; break; default : regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry; + llassert(0); break; } @@ -279,4 +316,31 @@ LLFloaterPathfindingConsole::EPathSelectionState LLFloaterPathfindingConsole::ge F32 LLFloaterPathfindingConsole::getCharacterWidth() const { return mCharacterWidthSlider->getValueF32(); -} \ No newline at end of file +} + +LLFloaterPathfindingConsole::ECharacterType LLFloaterPathfindingConsole::getCharacterType() const +{ + ECharacterType characterType; + + switch (mCharacterTypeRadioGroup->getValue().asInteger()) + { + case 1 : + characterType = kCharacterTypeA; + break; + case 2 : + characterType = kCharacterTypeB; + break; + case 3 : + characterType = kCharacterTypeC; + break; + case 4 : + characterType = kCharacterTypeD; + break; + default : + characterType = kCharacterTypeA; + llassert(0); + break; + } + + return characterType; +} diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index e21d69c1eb..a0a1500d94 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -54,6 +54,14 @@ class LLFloaterPathfindingConsole kPathSelectEndPoint = 2 } EPathSelectionState; + typedef enum + { + kCharacterTypeA = 0, + kCharacterTypeB = 1, + kCharacterTypeC = 2, + kCharacterTypeD = 3 + } ECharacterType; + public: virtual BOOL postBuild(); @@ -74,11 +82,13 @@ private: void onRegionOverlayDisplaySwitch(); void onPathSelectionSwitch(); void onCharacterWidthSet(); + void onCharacterTypeSwitch(); void onViewEditLinksetClicked(); ERegionOverlayDisplay getRegionOverlayDisplay() const; EPathSelectionState getPathSelectionState() const; F32 getCharacterWidth() const; + ECharacterType getCharacterType() const; LLCheckBoxCtrl *mShowNavmeshCheckBox; LLCheckBoxCtrl *mShowExcludeVolumesCheckBox; @@ -87,6 +97,7 @@ private: LLRadioGroup *mRegionOverlayDisplayRadioGroup; LLRadioGroup *mPathSelectionRadioGroup; LLSliderCtrl *mCharacterWidthSlider; + LLRadioGroup *mCharacterTypeRadioGroup; LLNavMeshDownloadObserver mNavmeshDownloadObserver; }; diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml index 444347808b..88905dd094 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -73,7 +73,7 @@ + value="1"/> + value="2"/> + value="1" + name="character_type_a"/> + value="2" + name="character_type_b"/> + value="3" + name="character_type_c"/> + value="4" + name="character_type_d"/>