diff options
author | Todd Stinson <stinson@lindenlab.com> | 2011-12-19 17:49:47 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2011-12-19 17:49:47 -0800 |
commit | 32fe974ac272ac5f92dd4c5c84e482b0acb36fe2 (patch) | |
tree | f096dba36cb03185f33a215246c2a79b72c92caf /indra/newview | |
parent | 34a847fabdfb42c7a6cf555c10fed095c6d8b2f2 (diff) |
Stubbing out functionality for catching the terrain material properties changes.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 76 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.h | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_console.xml | 8 |
3 files changed, 92 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index cd3794f5a9..20ce7b8f0c 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -35,6 +35,8 @@ #include "llcheckboxctrl.h"
#include "llradiogroup.h"
#include "llsliderctrl.h"
+#include "lllineeditor.h"
+#include "lltextvalidate.h"
#include "llnavmeshstation.h"
#include "llviewerregion.h"
@@ -80,7 +82,27 @@ BOOL LLFloaterPathfindingConsole::postBuild() mCharacterTypeRadioGroup = findChild<LLRadioGroup>("character_type");
llassert(mCharacterTypeRadioGroup != NULL);
- mCharacterTypeRadioGroup ->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterTypeSwitch, this));
+ mCharacterTypeRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterTypeSwitch, this));
+
+ mTerrainMaterialA = findChild<LLLineEditor>("terrain_material_a");
+ llassert(mTerrainMaterialA != NULL);
+ mTerrainMaterialA->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialASet, this));
+ mTerrainMaterialA->setPrevalidate(LLTextValidate::validateFloat);
+
+ mTerrainMaterialB = findChild<LLLineEditor>("terrain_material_b");
+ llassert(mTerrainMaterialB != NULL);
+ mTerrainMaterialB->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialBSet, this));
+ mTerrainMaterialB->setPrevalidate(LLTextValidate::validateFloat);
+
+ mTerrainMaterialC = findChild<LLLineEditor>("terrain_material_c");
+ llassert(mTerrainMaterialC != NULL);
+ mTerrainMaterialC->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialCSet, this));
+ mTerrainMaterialC->setPrevalidate(LLTextValidate::validateFloat);
+
+ mTerrainMaterialD = findChild<LLLineEditor>("terrain_material_d");
+ llassert(mTerrainMaterialD != NULL);
+ mTerrainMaterialD->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialDSet, this));
+ mTerrainMaterialD->setPrevalidate(LLTextValidate::validateFloat);
return LLFloater::postBuild();
}
@@ -95,6 +117,10 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mPathSelectionRadioGroup(NULL),
mCharacterWidthSlider(NULL),
mCharacterTypeRadioGroup(NULL),
+ mTerrainMaterialA(NULL),
+ mTerrainMaterialB(NULL),
+ mTerrainMaterialC(NULL),
+ mTerrainMaterialD(NULL),
mNavmeshDownloadObserver()
{
}
@@ -285,6 +311,34 @@ void LLFloaterPathfindingConsole::onRefreshNavmeshClicked() llwarns << "functionality has not yet been implemented to handle refreshing of the navmesh" << llendl;
}
+void LLFloaterPathfindingConsole::onTerrainMaterialASet()
+{
+ F32 terrainMaterial = getTerrainMaterialA();
+ llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialA->getName()
+ << "' to value (" << terrainMaterial << ")" << llendl;
+}
+
+void LLFloaterPathfindingConsole::onTerrainMaterialBSet()
+{
+ F32 terrainMaterial = getTerrainMaterialB();
+ llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialB->getName()
+ << "' to value (" << terrainMaterial << ")" << llendl;
+}
+
+void LLFloaterPathfindingConsole::onTerrainMaterialCSet()
+{
+ F32 terrainMaterial = getTerrainMaterialC();
+ llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialC->getName()
+ << "' to value (" << terrainMaterial << ")" << llendl;
+}
+
+void LLFloaterPathfindingConsole::onTerrainMaterialDSet()
+{
+ F32 terrainMaterial = getTerrainMaterialD();
+ llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialD->getName()
+ << "' to value (" << terrainMaterial << ")" << llendl;
+}
+
LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole::getRegionOverlayDisplay() const
{
ERegionOverlayDisplay regionOverlayDisplay;
@@ -356,3 +410,23 @@ LLFloaterPathfindingConsole::ECharacterType LLFloaterPathfindingConsole::getChar return characterType;
}
+
+F32 LLFloaterPathfindingConsole::getTerrainMaterialA() const
+{
+ return mTerrainMaterialA->getValue().asReal();
+}
+
+F32 LLFloaterPathfindingConsole::getTerrainMaterialB() const
+{
+ return mTerrainMaterialB->getValue().asReal();
+}
+
+F32 LLFloaterPathfindingConsole::getTerrainMaterialC() const
+{
+ return mTerrainMaterialC->getValue().asReal();
+}
+
+F32 LLFloaterPathfindingConsole::getTerrainMaterialD() const
+{
+ return mTerrainMaterialD->getValue().asReal();
+}
diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index e0dd796ef6..1ba9f2a6ee 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -35,6 +35,7 @@ class LLSD; class LLCheckBoxCtrl;
class LLRadioGroup;
class LLSliderCtrl;
+class LLLineEditor;
class LLFloaterPathfindingConsole
: public LLFloater
@@ -86,11 +87,19 @@ private: void onViewEditLinksetClicked();
void onRebuildNavmeshClicked();
void onRefreshNavmeshClicked();
+ void onTerrainMaterialASet();
+ void onTerrainMaterialBSet();
+ void onTerrainMaterialCSet();
+ void onTerrainMaterialDSet();
ERegionOverlayDisplay getRegionOverlayDisplay() const;
EPathSelectionState getPathSelectionState() const;
F32 getCharacterWidth() const;
ECharacterType getCharacterType() const;
+ F32 getTerrainMaterialA() const;
+ F32 getTerrainMaterialB() const;
+ F32 getTerrainMaterialC() const;
+ F32 getTerrainMaterialD() const;
LLCheckBoxCtrl *mShowNavmeshCheckBox;
LLCheckBoxCtrl *mShowExcludeVolumesCheckBox;
@@ -100,6 +109,10 @@ private: LLRadioGroup *mPathSelectionRadioGroup;
LLSliderCtrl *mCharacterWidthSlider;
LLRadioGroup *mCharacterTypeRadioGroup;
+ LLLineEditor *mTerrainMaterialA;
+ LLLineEditor *mTerrainMaterialB;
+ LLLineEditor *mTerrainMaterialC;
+ LLLineEditor *mTerrainMaterialD;
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 72d32b077b..5716ec30b7 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -369,7 +369,7 @@ of the mesh: layout="topleft" left_delta="22" max_length_bytes="10" - name="estate" + name="terrain_material_a" width="46" /> <text height="13" @@ -392,7 +392,7 @@ of the mesh: layout="topleft" left_delta="22" max_length_bytes="10" - name="estate" + name="terrain_material_b" width="46" /> <text height="13" @@ -415,7 +415,7 @@ of the mesh: layout="topleft" left_delta="22" max_length_bytes="10" - name="estate" + name="terrain_material_c" width="46" /> <text height="13" @@ -438,7 +438,7 @@ of the mesh: layout="topleft" left_delta="22" max_length_bytes="10" - name="estate" + name="terrain_material_d" width="46" /> <text height="38" |