diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-02-10 19:59:03 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-02-10 19:59:03 -0800 |
commit | efdba568f60a8d939fcfd40ee0cf6a8e205a5e0b (patch) | |
tree | 713773321c74d89e32a14d0f83744bef0ae2896d /indra | |
parent | db977bf85c9e7eb3afc98813dda13107672bb2f6 (diff) |
PATH-284: Altering the design toward the new layout. Starting to re-hookup the functionality to the new controls. NOTE: This DOES break the pathing floater functionality.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.cpp | 330 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingconsole.h | 62 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_console.xml | 708 |
3 files changed, 392 insertions, 708 deletions
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 51952d87b5..ca39463b24 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -42,13 +42,6 @@ #include "LLPathingLib.h" -#define XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY 1 -#define XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY 2 - -#define XUI_PATH_SELECT_NONE 0 -#define XUI_PATH_SELECT_START_POINT 1 -#define XUI_PATH_SELECT_END_POINT 2 - #define XUI_CHARACTER_TYPE_A 1 #define XUI_CHARACTER_TYPE_B 2 #define XUI_CHARACTER_TYPE_C 3 @@ -63,32 +56,33 @@ const int MAX_OBSERVERS = 10; BOOL LLFloaterPathfindingConsole::postBuild() { childSetAction("view_and_edit_linksets", boost::bind(&LLFloaterPathfindingConsole::onViewEditLinksetClicked, this)); - childSetAction("rebuild_navmesh", boost::bind(&LLFloaterPathfindingConsole::onRebuildNavMeshClicked, this)); - childSetAction("refresh_navmesh", boost::bind(&LLFloaterPathfindingConsole::onRefreshNavMeshClicked, this)); - mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh_overlay"); + mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh"); llassert(mShowNavMeshCheckBox != NULL); mShowNavMeshCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowNavMeshToggle, this)); - mShowExcludeVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_exclusion_volumes"); - llassert(mShowExcludeVolumesCheckBox != NULL); - mShowExcludeVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowExcludeVolumesToggle, this)); + mShowWalkablesCheckBox = findChild<LLCheckBoxCtrl>("show_walkables"); + llassert(mShowWalkablesCheckBox != NULL); + mShowWalkablesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWalkablesToggle, this)); + + mShowStaticObstaclesCheckBox = findChild<LLCheckBoxCtrl>("show_static_obstacles"); + llassert(mShowStaticObstaclesCheckBox != NULL); + mShowStaticObstaclesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowStaticObstaclesToggle, this)); - mShowPathCheckBox = findChild<LLCheckBoxCtrl>("show_path"); - llassert(mShowPathCheckBox != NULL); - mShowPathCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowPathToggle, this)); + mShowMaterialVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_material_volumes"); + llassert(mShowMaterialVolumesCheckBox != NULL); + mShowMaterialVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowMaterialVolumesToggle, this)); - mShowWaterPlaneCheckBox = findChild<LLCheckBoxCtrl>("show_water_plane"); - llassert(mShowWaterPlaneCheckBox != NULL); - mShowWaterPlaneCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWaterPlaneToggle, this)); + mShowExclusionVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_exclusion_volumes"); + llassert(mShowExclusionVolumesCheckBox != NULL); + mShowExclusionVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowExclusionVolumesToggle, this)); - mRegionOverlayDisplayRadioGroup = findChild<LLRadioGroup>("region_overlay_display"); - llassert(mRegionOverlayDisplayRadioGroup != NULL); - mRegionOverlayDisplayRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch, this)); + mShowWorldCheckBox = findChild<LLCheckBoxCtrl>("show_world"); + llassert(mShowWorldCheckBox != NULL); + mShowWorldCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWorldToggle, this)); - mPathSelectionRadioGroup = findChild<LLRadioGroup>("path_selection"); - llassert(mPathSelectionRadioGroup != NULL); - mPathSelectionRadioGroup ->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onPathSelectionSwitch, this)); + mPathfindingStatus = findChild<LLTextBase>("pathfinding_status"); + llassert(mPathfindingStatus != NULL); mCharacterWidthSlider = findChild<LLSliderCtrl>("character_width"); llassert(mCharacterWidthSlider != NULL); @@ -98,113 +92,9 @@ BOOL LLFloaterPathfindingConsole::postBuild() llassert(mCharacterTypeRadioGroup != NULL); mCharacterTypeRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterTypeSwitch, this)); - mPathfindingStatus = findChild<LLTextBase>("pathfinding_status"); - llassert(mPathfindingStatus != NULL); - - 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(); } -LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole::getRegionOverlayDisplay() const -{ - ERegionOverlayDisplay regionOverlayDisplay; - switch (mRegionOverlayDisplayRadioGroup->getValue().asInteger()) - { - case XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY : - regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry; - break; - case XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY : - regionOverlayDisplay = kRenderOverlayOnAllRenderableGeometry; - break; - default : - regionOverlayDisplay = kRenderOverlayOnFixedPhysicsGeometry; - llassert(0); - break; - } - - return regionOverlayDisplay; -} - -void LLFloaterPathfindingConsole::setRegionOverlayDisplay(ERegionOverlayDisplay pRegionOverlayDisplay) -{ - LLSD radioGroupValue; - - switch (pRegionOverlayDisplay) - { - case kRenderOverlayOnFixedPhysicsGeometry : - radioGroupValue = XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY; - break; - case kRenderOverlayOnAllRenderableGeometry : - radioGroupValue = XUI_RENDER_OVERLAY_ON_ALL_RENDERABLE_GEOMETRY; - break; - default : - radioGroupValue = XUI_RENDER_OVERLAY_ON_FIXED_PHYSICS_GEOMETRY; - llassert(0); - break; - } - - mRegionOverlayDisplayRadioGroup->setValue(radioGroupValue); -} - -LLFloaterPathfindingConsole::EPathSelectionState LLFloaterPathfindingConsole::getPathSelectionState() const -{ - EPathSelectionState pathSelectionState; - - switch (mPathSelectionRadioGroup->getValue().asInteger()) - { - case XUI_PATH_SELECT_START_POINT : - pathSelectionState = kPathSelectStartPoint; - break; - case XUI_PATH_SELECT_END_POINT : - pathSelectionState = kPathSelectEndPoint; - break; - default : - pathSelectionState = kPathSelectNone; - break; - } - - return pathSelectionState; -} - -void LLFloaterPathfindingConsole::setPathSelectionState(EPathSelectionState pPathSelectionState) -{ - LLSD radioGroupValue; - - switch (pPathSelectionState) - { - case kPathSelectStartPoint : - radioGroupValue = XUI_PATH_SELECT_START_POINT; - break; - case kPathSelectEndPoint : - radioGroupValue = XUI_PATH_SELECT_END_POINT; - break; - default : - radioGroupValue = XUI_PATH_SELECT_NONE; - break; - } - - mPathSelectionRadioGroup->setValue(radioGroupValue); -} - F32 LLFloaterPathfindingConsole::getCharacterWidth() const { return mCharacterWidthSlider->getValueF32(); @@ -269,46 +159,6 @@ void LLFloaterPathfindingConsole::setCharacterType(ECharacterType pCharacterType mCharacterTypeRadioGroup->setValue(radioGroupValue); } -F32 LLFloaterPathfindingConsole::getTerrainMaterialA() const -{ - return mTerrainMaterialA->getValue().asReal(); -} - -void LLFloaterPathfindingConsole::setTerrainMaterialA(F32 pTerrainMaterial) -{ - mTerrainMaterialA->setValue(LLSD(pTerrainMaterial)); -} - -F32 LLFloaterPathfindingConsole::getTerrainMaterialB() const -{ - return mTerrainMaterialB->getValue().asReal(); -} - -void LLFloaterPathfindingConsole::setTerrainMaterialB(F32 pTerrainMaterial) -{ - mTerrainMaterialB->setValue(LLSD(pTerrainMaterial)); -} - -F32 LLFloaterPathfindingConsole::getTerrainMaterialC() const -{ - return mTerrainMaterialC->getValue().asReal(); -} - -void LLFloaterPathfindingConsole::setTerrainMaterialC(F32 pTerrainMaterial) -{ - mTerrainMaterialC->setValue(LLSD(pTerrainMaterial)); -} - -F32 LLFloaterPathfindingConsole::getTerrainMaterialD() const -{ - return mTerrainMaterialD->getValue().asReal(); -} - -void LLFloaterPathfindingConsole::setTerrainMaterialD(F32 pTerrainMaterial) -{ - mTerrainMaterialD->setValue(LLSD(pTerrainMaterial)); -} - void LLFloaterPathfindingConsole::setHasNavMeshReceived() { std::string str = getString("navmesh_fetch_complete_available"); @@ -330,18 +180,14 @@ void LLFloaterPathfindingConsole::setHasNoNavMesh() LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) : LLFloater(pSeed), mShowNavMeshCheckBox(NULL), - mShowExcludeVolumesCheckBox(NULL), - mShowPathCheckBox(NULL), - mShowWaterPlaneCheckBox(NULL), - mRegionOverlayDisplayRadioGroup(NULL), - mPathSelectionRadioGroup(NULL), + mShowWalkablesCheckBox(NULL), + mShowStaticObstaclesCheckBox(NULL), + mShowMaterialVolumesCheckBox(NULL), + mShowExclusionVolumesCheckBox(NULL), + mShowWorldCheckBox(NULL), mCharacterWidthSlider(NULL), mCharacterTypeRadioGroup(NULL), mPathfindingStatus(NULL), - mTerrainMaterialA(NULL), - mTerrainMaterialB(NULL), - mTerrainMaterialC(NULL), - mTerrainMaterialD(NULL), mNavMeshCnt(0), mHasStartPoint(false), mHasEndPoint(false) @@ -423,9 +269,19 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) llinfos<<"Region has does not required caps of type ["<<capability<<"]"<<llendl; } } + LLPathingLib::getInstance()->setRenderPath(true); } } +void LLFloaterPathfindingConsole::onClose(bool app_quitting) +{ + //make sure we have a pathing system + if ( !LLPathingLib::getInstance() ) + { + LLPathingLib::getInstance()->setRenderPath(false); + } +} + void LLFloaterPathfindingConsole::onShowNavMeshToggle() { BOOL checkBoxValue = mShowNavMeshCheckBox->get(); @@ -442,97 +298,90 @@ void LLFloaterPathfindingConsole::onShowNavMeshToggle() } } -void LLFloaterPathfindingConsole::onShowExcludeVolumesToggle() +void LLFloaterPathfindingConsole::onShowWalkablesToggle() { - BOOL checkBoxValue = mShowExcludeVolumesCheckBox->get(); + BOOL checkBoxValue = mShowWalkablesCheckBox->get(); LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); if (llPathingLibInstance != NULL) { - llPathingLibInstance->setRenderShapes(checkBoxValue); + //llPathingLibInstance->setRenderNavMesh(checkBoxValue); + llwarns << "functionality has not yet been implemented to set walkables to " + << (checkBoxValue ? "TRUE" : "FALSE") << llendl; + } else { - mShowExcludeVolumesCheckBox->set(FALSE); + mShowWalkablesCheckBox->set(FALSE); llwarns << "cannot find LLPathingLib instance" << llendl; } } -void LLFloaterPathfindingConsole::onShowPathToggle() +void LLFloaterPathfindingConsole::onShowStaticObstaclesToggle() { - BOOL checkBoxValue = mShowPathCheckBox->get(); + BOOL checkBoxValue = mShowStaticObstaclesCheckBox->get(); LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); if (llPathingLibInstance != NULL) { - llPathingLibInstance->setRenderPath(checkBoxValue); + //llPathingLibInstance->setRenderNavMesh(checkBoxValue); + llwarns << "functionality has not yet been implemented to set static obstacles to " + << (checkBoxValue ? "TRUE" : "FALSE") << llendl; } else { - mShowPathCheckBox->set(FALSE); + mShowStaticObstaclesCheckBox->set(FALSE); llwarns << "cannot find LLPathingLib instance" << llendl; } } -void LLFloaterPathfindingConsole::onShowWaterPlaneToggle() +void LLFloaterPathfindingConsole::onShowMaterialVolumesToggle() { - BOOL checkBoxValue = mShowWaterPlaneCheckBox->get(); + BOOL checkBoxValue = mShowMaterialVolumesCheckBox->get(); LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); if (llPathingLibInstance != NULL) { - llPathingLibInstance->setRenderWaterPlane(checkBoxValue); + //llPathingLibInstance->setRenderNavMesh(checkBoxValue); + llwarns << "functionality has not yet been implemented to set material volumes to " + << (checkBoxValue ? "TRUE" : "FALSE") << llendl; } else { - mShowWaterPlaneCheckBox->set(FALSE); + mShowMaterialVolumesCheckBox->set(FALSE); llwarns << "cannot find LLPathingLib instance" << llendl; } - - llwarns << "functionality has not yet been implemented to toggle '" - << mShowWaterPlaneCheckBox->getLabel() << "' to " - << (checkBoxValue ? "ON" : "OFF") << llendl; } -void LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch() +void LLFloaterPathfindingConsole::onShowExclusionVolumesToggle() { + BOOL checkBoxValue = mShowExclusionVolumesCheckBox->get(); + LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); if (llPathingLibInstance != NULL) { - switch (getRegionOverlayDisplay()) - { - case kRenderOverlayOnFixedPhysicsGeometry : - llPathingLibInstance->setRenderOverlayMode(false); - break; - case kRenderOverlayOnAllRenderableGeometry : - llPathingLibInstance->setRenderOverlayMode(true); - break; - default : - llPathingLibInstance->setRenderOverlayMode(false); - llassert(0); - break; - } + llPathingLibInstance->setRenderShapes(checkBoxValue); } else { - this->setRegionOverlayDisplay(kRenderOverlayOnFixedPhysicsGeometry); + mShowExclusionVolumesCheckBox->set(FALSE); llwarns << "cannot find LLPathingLib instance" << llendl; } } -void LLFloaterPathfindingConsole::onPathSelectionSwitch() +void LLFloaterPathfindingConsole::onShowWorldToggle() { - switch (getPathSelectionState()) + BOOL checkBoxValue = mShowWorldCheckBox->get(); + + LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); + if (llPathingLibInstance != NULL) { - case kPathSelectNone : - break; - case kPathSelectStartPoint : - break; - case kPathSelectEndPoint : - break; - default : - llassert(0); - break; + llPathingLibInstance->setRenderOverlayMode(checkBoxValue); + } + else + { + mShowWorldCheckBox->set(FALSE); + llwarns << "cannot find LLPathingLib instance" << llendl; } } @@ -577,47 +426,10 @@ void LLFloaterPathfindingConsole::onViewEditLinksetClicked() LLFloaterPathfindingLinksets::openLinksetsEditor(); } -void LLFloaterPathfindingConsole::onRebuildNavMeshClicked() -{ - llwarns << "functionality has not yet been implemented to handle rebuilding of the navmesh" << llendl; -} - -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; -} - void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, const LLVector3& point2 ) { +#if 0 switch (getPathSelectionState()) { case kPathSelectNone : @@ -639,7 +451,7 @@ void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, c llassert(0); break; } - +#endif generatePath(); } diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingconsole.h index f62fd9742b..a2e247c1c9 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingconsole.h @@ -47,19 +47,6 @@ class LLFloaterPathfindingConsole public: typedef enum { - kRenderOverlayOnFixedPhysicsGeometry = 0, - kRenderOverlayOnAllRenderableGeometry = 1 - } ERegionOverlayDisplay; - - typedef enum - { - kPathSelectNone = 0, - kPathSelectStartPoint = 1, - kPathSelectEndPoint = 2 - } EPathSelectionState; - - typedef enum - { kCharacterTypeA = 0, kCharacterTypeB = 1, kCharacterTypeC = 2, @@ -70,30 +57,12 @@ public: //Populates a data packet that is forwarded onto the LLPathingSystem void providePathingData( const LLVector3& point1, const LLVector3& point2 ); - ERegionOverlayDisplay getRegionOverlayDisplay() const; - void setRegionOverlayDisplay(ERegionOverlayDisplay pRegionOverlayDisplay); - - EPathSelectionState getPathSelectionState() const; - void setPathSelectionState(EPathSelectionState pPathSelectionState); - F32 getCharacterWidth() const; void setCharacterWidth(F32 pCharacterWidth); ECharacterType getCharacterType() const; void setCharacterType(ECharacterType pCharacterType); - F32 getTerrainMaterialA() const; - void setTerrainMaterialA(F32 pTerrainMaterial); - - F32 getTerrainMaterialB() const; - void setTerrainMaterialB(F32 pTerrainMaterial); - - F32 getTerrainMaterialC() const; - void setTerrainMaterialC(F32 pTerrainMaterial); - - F32 getTerrainMaterialD() const; - void setTerrainMaterialD(F32 pTerrainMaterial); - void setHasNavMeshReceived(); void setHasNoNavMesh(); @@ -106,37 +75,28 @@ private: virtual ~LLFloaterPathfindingConsole(); virtual void onOpen(const LLSD& pKey); + virtual void onClose(bool app_quitting); void onShowNavMeshToggle(); - void onShowExcludeVolumesToggle(); - void onShowPathToggle(); - void onShowWaterPlaneToggle(); - void onRegionOverlayDisplaySwitch(); - void onPathSelectionSwitch(); + void onShowWalkablesToggle(); + void onShowStaticObstaclesToggle(); + void onShowMaterialVolumesToggle(); + void onShowExclusionVolumesToggle(); + void onShowWorldToggle(); void onCharacterWidthSet(); void onCharacterTypeSwitch(); void onViewEditLinksetClicked(); - void onRebuildNavMeshClicked(); - void onRefreshNavMeshClicked(); - void onTerrainMaterialASet(); - void onTerrainMaterialBSet(); - void onTerrainMaterialCSet(); - void onTerrainMaterialDSet(); void generatePath(); LLCheckBoxCtrl *mShowNavMeshCheckBox; - LLCheckBoxCtrl *mShowExcludeVolumesCheckBox; - LLCheckBoxCtrl *mShowPathCheckBox; - LLCheckBoxCtrl *mShowWaterPlaneCheckBox; - LLRadioGroup *mRegionOverlayDisplayRadioGroup; - LLRadioGroup *mPathSelectionRadioGroup; + LLCheckBoxCtrl *mShowWalkablesCheckBox; + LLCheckBoxCtrl *mShowStaticObstaclesCheckBox; + LLCheckBoxCtrl *mShowMaterialVolumesCheckBox; + LLCheckBoxCtrl *mShowExclusionVolumesCheckBox; + LLCheckBoxCtrl *mShowWorldCheckBox; LLSliderCtrl *mCharacterWidthSlider; LLRadioGroup *mCharacterTypeRadioGroup; LLTextBase *mPathfindingStatus; - LLLineEditor *mTerrainMaterialA; - LLLineEditor *mTerrainMaterialB; - LLLineEditor *mTerrainMaterialC; - LLLineEditor *mTerrainMaterialD; LLNavMeshDownloadObserver mNavMeshDownloadObserver[10]; int mCurrentMDO; 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 37555eea3a..c0588c9931 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml @@ -2,15 +2,15 @@ <floater open_positioning="cascading" can_tear_off="false" - height="228" + height="270" layout="topleft" - name="floater_pathfinding" - help_topic="floater_pathfinding" + name="floater_pathfinding_console" + help_topic="floater_pathfinding_console" reuse_instance="true" save_rect="true" single_instance="true" - title="Pathfinding setup" - width="833"> + title="Pathfinding" + width="450"> <floater.string name="navmesh_fetch_initial"></floater.string> <floater.string name="navmesh_fetch_inprogress">Downloading the navmesh ...</floater.string> <floater.string name="navmesh_fetch_complete_available">Navmesh received.</floater.string> @@ -29,438 +29,350 @@ left="12" top="20" width="208"> - Show overlays: + Show: </text> <check_box height="19" label="Navmesh" layout="topleft" left="20" - name="show_navmesh_overlay" + name="show_navmesh" top_pad="5" width="90" /> <check_box height="19" - label="Exclusion volumes" + label="Walkables" layout="topleft" left="20" - name="show_exclusion_volumes" + name="show_walkables" top_pad="0" width="90" /> <check_box height="19" - label="Path" + label="Static obstacles" layout="topleft" left="20" - name="show_path" + name="show_static_obstacles" top_pad="0" width="90" /> <check_box height="19" - label="Water plane" + label="Material volumes" layout="topleft" left="20" - name="show_water_plane" + name="show_material_volumes" top_pad="0" width="90" /> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" + <check_box + height="19" + label="Exclusion volumes" layout="topleft" - left="12" - top_pad="10" - width="208"> - Overlay on: - </text> - <radio_group - follows="top|left" - height="45" - value="1" + left="20" + name="show_exclusion_volumes" + top_pad="0" + width="90" /> + <check_box + height="19" + label="World" layout="topleft" - left_delta="8" - name="region_overlay_display" - top_delta="17" - width="200"> - <radio_item - label="Fixed physics geometry" - layout="topleft" - height="14" - name="display_overlay_on_fixed" - value="1"/> - <radio_item - label="All renderable geometry" - layout="topleft" - height="14" - name="display_overlay_on_all" - value="2"/> - </radio_group> - <view_border + left="20" + name="show_world" + top_pad="0" + width="90" /> + <panel + border="true" bevel_style="none" - follows="top|left" - height="203" - layout="topleft" - name="horiz_separator_1" - top="15" - left="228" - width="0"/> - <text - height="24" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - line_spacing.pixels="2" - follows="left|top" - layout="topleft" - left="240" - top="18" - width="208"> -Click on two points -to see the path between them. - </text> - <radio_group - allow_deselect="true" - follows="top|left" - height="45" - layout="topleft" - left_delta="0" - name="path_selection" - top_delta="33" - value="0" - width="200"> - <radio_item - label="Choose start point" - layout="topleft" - height="14" - name="choose_path_start_point" - value="1"/> - <radio_item - label="Choose end point" - layout="topleft" - height="14" - name="choose_path_end_point" - value="2"/> - </radio_group> - <text - height="14" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" follows="left|top" layout="topleft" - left="240" - width="208"> - Character width - </text> - <slider - decimal_digits="1" - height="14" - increment="0.1" - layout="topleft" - max_val="2" - min_val="0.2" - name="character_width" - top_pad="7" - value="1" - width="145" /> - <text - height="14" - word_wrap="false" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - top_pad="-14" - left="382" - width="208"> - m - </text> - <text - height="14" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - left="240" - top_pad="10" - width="208"> - Character type - </text> - <radio_group - follows="top|left" - height="20" - layout="topleft" - left_delta="0" - name="character_type" - top_delta="20" - value="1" + height="60" width="200"> - <radio_item - label="A" - height="14" - width="30" - value="1" - name="character_type_a"/> - <radio_item - label="B" - height="14" - width="30" - layout="topleft" - top="4" - left="50" - value="2" - name="character_type_b"/> - <radio_item - label="C" - height="14" - width="30" + <text + height="13" + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" layout="topleft" - top="4" - left="100" - value="3" - name="character_type_c"/> - <radio_item - label="D" - height="14" - width="30" + left="5" + top_pad="5" + width="190"> + Status: + </text> + <text + height="28" + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" layout="topleft" - top="4" - left="150" - value="4" - name="character_type_d"/> - </radio_group> - <text - height="14" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - left="240" - name="pathfinding_status" - top_pad="10" - width="208"> - </text> - <view_border - bevel_style="none" - follows="top|left" - height="203" - layout="topleft" - name="horiz_separator_2" - top="15" - left="456" - width="0"/> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - left="470" - top="18" - width="180"> - View / edit linkset attributes: - </text> + left="15" + name="pathfinding_status" + top_pad="10" + width="180"> + </text> + </panel> <button follows="left|top" height="21" - label="Linksets..." + left="20" + label="Characters..." layout="topleft" - name="view_and_edit_linksets" + name="view_characters_floater" + top_pad="10" width="96"/> - <text - height="25" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - line_spacing.pixels="4" - follows="left|top" - layout="topleft" - top_pad="22" - width="180"> -If you have made changes -to objects or terrain: - </text> - <button - follows="left|top" - height="22" - label="Rebuild navmesh" - layout="topleft" - name="rebuild_navmesh" - top_pad="14" - width="149"/> - <text - height="25" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - line_spacing.pixels="4" - follows="left|top" - layout="topleft" - top_pad="14" - width="180"> -To load the current state -of the mesh: - </text> - <button - follows="left|top" - height="21" - label="Refresh" - layout="topleft" - name="refresh_navmesh" - top_pad="9" - width="95"/> - <view_border - bevel_style="none" - follows="top|left" - height="203" - layout="topleft" - name="horiz_separator_3" - top="15" - left="667" - width="0"/> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - left="689" - top="18" - width="208"> - Terrain materials - </text> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - follows="left|top" - layout="topleft" - top_pad="17" - width="208"> - A - </text> - <line_editor - border_style="line" - border_thickness="1" - follows="top|left" - height="21" - layout="topleft" - left_delta="22" - max_length_bytes="10" - name="terrain_material_a" - width="46" /> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - layout="topleft" - left_pad="-68" - top_pad="17" - width="208"> - B - </text> - <line_editor - border_style="line" - border_thickness="1" - follows="top|left" - height="21" - layout="topleft" - left_delta="22" - max_length_bytes="10" - name="terrain_material_b" - width="46" /> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - layout="topleft" - left_pad="-68" - top_pad="17" - width="208"> - C - </text> - <line_editor - border_style="line" - border_thickness="1" - follows="top|left" - height="21" - layout="topleft" - left_delta="22" - max_length_bytes="10" - name="terrain_material_c" - width="46" /> - <text - height="13" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - layout="topleft" - left_pad="-68" - top_pad="17" - width="208"> - D - </text> - <line_editor - border_style="line" - border_thickness="1" - follows="top|left" - height="21" - layout="topleft" - left_delta="22" - max_length_bytes="10" - name="terrain_material_d" - width="46" /> - <text - height="38" - word_wrap="true" - use_ellipses="false" - type="string" - text_color="LabelTextColor" - length="1" - line_spacing.pixels="4" + <tab_container follows="left|top" layout="topleft" - left_pad="-68" - top_pad="14" - width="180"> -Rebuild the navmesh -after making any -changes. - </text> + tab_position="top" + left="220" + top="20" + height="230" + width="220"> + <panel + border="true" + bevel_style="none" + follows="left|top" + layout="topleft" + name="edit_panel" + left="1" + label="Edit"> + <text + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + left="20" + top_pad="10" + height="13" + width="180"> + To blah blah blah: + </text> + <button + follows="left|top" + height="21" + left="30" + enabled="false" + label="Unfreeze" + layout="topleft" + name="enter_unfrozen_mode" + top_pad="0" + width="96"/> + <text + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + left="20" + top_pad="10" + height="13" + width="180"> + To blah blah blah: + </text> + <button + follows="left|top" + height="21" + left="30" + enabled="false" + label="Freeze" + layout="topleft" + name="enter_frozen_mode" + top_pad="0" + width="96"/> + <text + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + left="20" + top_pad="10" + height="13" + width="180"> + View / edit linkset attributes: + </text> + <button + follows="left|top" + height="21" + left="30" + label="Linksets..." + layout="topleft" + name="view_and_edit_linksets" + top_pad="0" + width="96"/> + <button + follows="left|top" + height="21" + label="Clear path" + layout="topleft" + name="clear_path_on_edit" + left="20" + top="175" + width="96"/> + </panel> + <panel + border="true" + bevel_style="none" + follows="left|top" + layout="topleft" + left="1" + name="test_panel" + label="Test"> + <text + height="14" + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + left="20" + width="190"> + Character width + </text> + <slider + decimal_digits="1" + height="14" + increment="0.1" + layout="topleft" + follows="left|top" + max_val="2" + min_val="0.2" + name="character_width" + top_pad="5" + value="1" + width="145" /> + <text + height="14" + word_wrap="false" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + top_pad="-14" + left_pad="0" + width="20"> + m + </text> + <text + height="14" + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + left_pad="-165" + top_pad="10" + width="190"> + Character type + </text> + <radio_group + follows="top|left" + height="20" + layout="topleft" + left_delta="0" + name="character_type" + top_delta="20" + value="1" + width="190"> + <radio_item + label="A" + height="14" + width="30" + value="1" + name="character_type_a"/> + <radio_item + label="B" + height="14" + width="30" + layout="topleft" + top="4" + left="50" + value="2" + name="character_type_b"/> + <radio_item + label="C" + height="14" + width="30" + layout="topleft" + top="4" + left="100" + value="3" + name="character_type_c"/> + <radio_item + label="D" + height="14" + width="30" + layout="topleft" + top="4" + left="150" + value="4" + name="character_type_d"/> + </radio_group> + <text + height="14" + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + left_pad="-190" + top_pad="10" + width="190"> + Ctrl-click to select start point. + </text> + <text + height="14" + word_wrap="true" + use_ellipses="false" + type="string" + text_color="LabelTextColor" + length="1" + follows="left|top" + layout="topleft" + top_pad="5" + width="190"> + Alt-click to select start point. + </text> + <text + height="14" + word_wrap="true" + use_ellipses="false" + type="string" + text_color="DrYellow" + length="1" + follows="left|top" + layout="topleft" + top_pad="15" + width="190"> + Result: No path found. + </text> + <button + follows="left|top" + height="21" + label="Clear path" + layout="topleft" + name="clear_path_on_test" + left="20" + top="175" + width="96"/> + </panel> + </tab_container> </floater> |