diff options
| -rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 74 | ||||
| -rw-r--r-- | indra/newview/llfloaterpathfindingconsole.h | 11 | ||||
| -rw-r--r-- | indra/newview/skins/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<LLRadioGroup>("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 @@    <radio_group        follows="top|left"        height="45" -      value="0" +      value="1"        layout="topleft"        left_delta="8"        name="region_overlay_display" @@ -84,13 +84,13 @@          layout="topleft"          height="14"          name="display_overlay_on_fixed" -        value="0"/> +        value="1"/>      <radio_item          label="All renderable geometry"          layout="topleft"          height="14"          name="display_overlay_on_all" -        value="1"/> +        value="2"/>    </radio_group>    <view_border        bevel_style="none" @@ -197,14 +197,16 @@ to see the path between them.        height="20"        layout="topleft"        left_delta="0" -      name="region_settings_radio_group" +      name="character_type"        top_delta="20" +      value="1"        width="200">      <radio_item          label="A"          height="14"          width="30" -        name="DisplayOverlayOnFixed"/> +	value="1" +        name="character_type_a"/>      <radio_item          label="B"          height="14" @@ -212,7 +214,8 @@ to see the path between them.          layout="topleft"          top="4"          left="50" -        name="DisplayOverlayOnFixed"/> +	value="2" +        name="character_type_b"/>      <radio_item          label="C"          height="14" @@ -220,7 +223,8 @@ to see the path between them.          layout="topleft"          top="4"          left="100" -        name="DisplayOverlayOnFixed"/> +	value="3" +        name="character_type_c"/>      <radio_item          label="D"          height="14" @@ -228,7 +232,8 @@ to see the path between them.          layout="topleft"          top="4"          left="150" -        name="DisplayOverlayOnFixed"/> +	value="4" +        name="character_type_d"/>    </radio_group>    <text        height="14"  | 
