diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/CMakeLists.txt | 4 | ||||
-rw-r--r-- | indra/newview/app_settings/commands.xml | 6 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingsetup.cpp (renamed from indra/newview/llfloaterpathfindingconsole.cpp) | 114 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingsetup.h (renamed from indra/newview/llfloaterpathfindingconsole.h) | 14 | ||||
-rw-r--r-- | indra/newview/llnavmeshstation.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llnavmeshstation.h | 14 | ||||
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 24 | ||||
-rw-r--r-- | indra/newview/llpanelvolume.h | 5 | ||||
-rw-r--r-- | indra/newview/llviewerdisplay.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerfloaterreg.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_setup.xml (renamed from indra/newview/skins/default/xui/en/floater_pathfinding_console.xml) | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 40 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 34 |
14 files changed, 179 insertions, 90 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 2e4c537942..1015aae055 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -218,8 +218,8 @@ set(viewer_SOURCE_FILES llfloaterobjectweights.cpp llfloateropenobject.cpp llfloateroutbox.cpp - llfloaterpathfindingconsole.cpp llfloaterpathfindinglinksets.cpp + llfloaterpathfindingsetup.cpp llfloaterpay.cpp llfloaterperms.cpp llfloaterpostprocess.cpp @@ -779,8 +779,8 @@ set(viewer_HEADER_FILES llfloaterobjectweights.h llfloateropenobject.h llfloateroutbox.h - llfloaterpathfindingconsole.h llfloaterpathfindinglinksets.h + llfloaterpathfindingsetup.h llfloaterpay.h llfloaterperms.h llfloaterpostprocess.h diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 22dc336399..7d42f237b1 100644 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -155,15 +155,15 @@ is_running_function="Floater.IsOpen" is_running_parameters="people" /> - <command name="pathfinding_console" + <command name="pathfinding_setup" available_in_toybox="false" icon="Command_Pathfinding_Icon" label_ref="Command_Pathfinding_Label" tooltip_ref="Command_Pathfinding_Tooltip" execute_function="Floater.ToggleOrBringToFront" - execute_parameters="pathfinding_console" + execute_parameters="pathfinding_setup" is_running_function="Floater.IsOpen" - is_running_parameters="pathfinding_console" + is_running_parameters="pathfinding_setup" /> <command name="pathfinding_linksets" available_in_toybox="false" diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingsetup.cpp index 50edc55d76..f5df1fe0de 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingsetup.cpp @@ -1,5 +1,5 @@ /** -* @file llfloaterpathfindingconsole.cpp +* @file llfloaterpathfindingsetup.cpp * @author William Todd Stinson * @brief "Pathfinding console" floater, allowing manipulation of the Havok AI pathfinding settings. * @@ -26,7 +26,7 @@ */ #include "llviewerprecompiledheaders.h" -#include "llfloaterpathfindingconsole.h" +#include "llfloaterpathfindingsetup.h" #include "llfloaterpathfindinglinksets.h" #include "llsd.h" @@ -57,74 +57,74 @@ const int CURRENT_REGION = 99; const int MAX_OBSERVERS = 10; //--------------------------------------------------------------------------- -// LLFloaterPathfindingConsole +// LLFloaterPathfindingSetup //--------------------------------------------------------------------------- -BOOL LLFloaterPathfindingConsole::postBuild() +BOOL LLFloaterPathfindingSetup::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)); + childSetAction("view_and_edit_linksets", boost::bind(&LLFloaterPathfindingSetup::onViewEditLinksetClicked, this)); + childSetAction("rebuild_navmesh", boost::bind(&LLFloaterPathfindingSetup::onRebuildNavMeshClicked, this)); + childSetAction("refresh_navmesh", boost::bind(&LLFloaterPathfindingSetup::onRefreshNavMeshClicked, this)); mShowNavMeshCheckBox = findChild<LLCheckBoxCtrl>("show_navmesh_overlay"); llassert(mShowNavMeshCheckBox != NULL); - mShowNavMeshCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowNavMeshToggle, this)); + mShowNavMeshCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowNavMeshToggle, this)); mShowExcludeVolumesCheckBox = findChild<LLCheckBoxCtrl>("show_exclusion_volumes"); llassert(mShowExcludeVolumesCheckBox != NULL); - mShowExcludeVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowExcludeVolumesToggle, this)); + mShowExcludeVolumesCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowExcludeVolumesToggle, this)); mShowPathCheckBox = findChild<LLCheckBoxCtrl>("show_path"); llassert(mShowPathCheckBox != NULL); - mShowPathCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowPathToggle, this)); + mShowPathCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowPathToggle, this)); mShowWaterPlaneCheckBox = findChild<LLCheckBoxCtrl>("show_water_plane"); llassert(mShowWaterPlaneCheckBox != NULL); - mShowWaterPlaneCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onShowWaterPlaneToggle, this)); + mShowWaterPlaneCheckBox->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onShowWaterPlaneToggle, this)); mRegionOverlayDisplayRadioGroup = findChild<LLRadioGroup>("region_overlay_display"); llassert(mRegionOverlayDisplayRadioGroup != NULL); - mRegionOverlayDisplayRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch, this)); + mRegionOverlayDisplayRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onRegionOverlayDisplaySwitch, this)); mPathSelectionRadioGroup = findChild<LLRadioGroup>("path_selection"); llassert(mPathSelectionRadioGroup != NULL); - mPathSelectionRadioGroup ->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onPathSelectionSwitch, this)); + mPathSelectionRadioGroup ->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onPathSelectionSwitch, this)); mCharacterWidthSlider = findChild<LLSliderCtrl>("character_width"); llassert(mCharacterWidthSlider != NULL); - mCharacterWidthSlider->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterWidthSet, this)); + mCharacterWidthSlider->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onCharacterWidthSet, this)); mCharacterTypeRadioGroup = findChild<LLRadioGroup>("character_type"); llassert(mCharacterTypeRadioGroup != NULL); - mCharacterTypeRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onCharacterTypeSwitch, this)); + mCharacterTypeRadioGroup->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::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->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialASet, this)); mTerrainMaterialA->setPrevalidate(LLTextValidate::validateFloat); mTerrainMaterialB = findChild<LLLineEditor>("terrain_material_b"); llassert(mTerrainMaterialB != NULL); - mTerrainMaterialB->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialBSet, this)); + mTerrainMaterialB->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialBSet, this)); mTerrainMaterialB->setPrevalidate(LLTextValidate::validateFloat); mTerrainMaterialC = findChild<LLLineEditor>("terrain_material_c"); llassert(mTerrainMaterialC != NULL); - mTerrainMaterialC->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialCSet, this)); + mTerrainMaterialC->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialCSet, this)); mTerrainMaterialC->setPrevalidate(LLTextValidate::validateFloat); mTerrainMaterialD = findChild<LLLineEditor>("terrain_material_d"); llassert(mTerrainMaterialD != NULL); - mTerrainMaterialD->setCommitCallback(boost::bind(&LLFloaterPathfindingConsole::onTerrainMaterialDSet, this)); + mTerrainMaterialD->setCommitCallback(boost::bind(&LLFloaterPathfindingSetup::onTerrainMaterialDSet, this)); mTerrainMaterialD->setPrevalidate(LLTextValidate::validateFloat); return LLFloater::postBuild(); } -LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole::getRegionOverlayDisplay() const +LLFloaterPathfindingSetup::ERegionOverlayDisplay LLFloaterPathfindingSetup::getRegionOverlayDisplay() const { ERegionOverlayDisplay regionOverlayDisplay; switch (mRegionOverlayDisplayRadioGroup->getValue().asInteger()) @@ -144,7 +144,7 @@ LLFloaterPathfindingConsole::ERegionOverlayDisplay LLFloaterPathfindingConsole:: return regionOverlayDisplay; } -void LLFloaterPathfindingConsole::setRegionOverlayDisplay(ERegionOverlayDisplay pRegionOverlayDisplay) +void LLFloaterPathfindingSetup::setRegionOverlayDisplay(ERegionOverlayDisplay pRegionOverlayDisplay) { LLSD radioGroupValue; @@ -165,7 +165,7 @@ void LLFloaterPathfindingConsole::setRegionOverlayDisplay(ERegionOverlayDisplay mRegionOverlayDisplayRadioGroup->setValue(radioGroupValue); } -LLFloaterPathfindingConsole::EPathSelectionState LLFloaterPathfindingConsole::getPathSelectionState() const +LLFloaterPathfindingSetup::EPathSelectionState LLFloaterPathfindingSetup::getPathSelectionState() const { EPathSelectionState pathSelectionState; @@ -185,7 +185,7 @@ LLFloaterPathfindingConsole::EPathSelectionState LLFloaterPathfindingConsole::ge return pathSelectionState; } -void LLFloaterPathfindingConsole::setPathSelectionState(EPathSelectionState pPathSelectionState) +void LLFloaterPathfindingSetup::setPathSelectionState(EPathSelectionState pPathSelectionState) { LLSD radioGroupValue; @@ -205,17 +205,17 @@ void LLFloaterPathfindingConsole::setPathSelectionState(EPathSelectionState pPat mPathSelectionRadioGroup->setValue(radioGroupValue); } -F32 LLFloaterPathfindingConsole::getCharacterWidth() const +F32 LLFloaterPathfindingSetup::getCharacterWidth() const { return mCharacterWidthSlider->getValueF32(); } -void LLFloaterPathfindingConsole::setCharacterWidth(F32 pCharacterWidth) +void LLFloaterPathfindingSetup::setCharacterWidth(F32 pCharacterWidth) { mCharacterWidthSlider->setValue(LLSD(pCharacterWidth)); } -LLFloaterPathfindingConsole::ECharacterType LLFloaterPathfindingConsole::getCharacterType() const +LLFloaterPathfindingSetup::ECharacterType LLFloaterPathfindingSetup::getCharacterType() const { ECharacterType characterType; @@ -242,7 +242,7 @@ LLFloaterPathfindingConsole::ECharacterType LLFloaterPathfindingConsole::getChar return characterType; } -void LLFloaterPathfindingConsole::setCharacterType(ECharacterType pCharacterType) +void LLFloaterPathfindingSetup::setCharacterType(ECharacterType pCharacterType) { LLSD radioGroupValue; @@ -269,47 +269,47 @@ void LLFloaterPathfindingConsole::setCharacterType(ECharacterType pCharacterType mCharacterTypeRadioGroup->setValue(radioGroupValue); } -F32 LLFloaterPathfindingConsole::getTerrainMaterialA() const +F32 LLFloaterPathfindingSetup::getTerrainMaterialA() const { return mTerrainMaterialA->getValue().asReal(); } -void LLFloaterPathfindingConsole::setTerrainMaterialA(F32 pTerrainMaterial) +void LLFloaterPathfindingSetup::setTerrainMaterialA(F32 pTerrainMaterial) { mTerrainMaterialA->setValue(LLSD(pTerrainMaterial)); } -F32 LLFloaterPathfindingConsole::getTerrainMaterialB() const +F32 LLFloaterPathfindingSetup::getTerrainMaterialB() const { return mTerrainMaterialB->getValue().asReal(); } -void LLFloaterPathfindingConsole::setTerrainMaterialB(F32 pTerrainMaterial) +void LLFloaterPathfindingSetup::setTerrainMaterialB(F32 pTerrainMaterial) { mTerrainMaterialB->setValue(LLSD(pTerrainMaterial)); } -F32 LLFloaterPathfindingConsole::getTerrainMaterialC() const +F32 LLFloaterPathfindingSetup::getTerrainMaterialC() const { return mTerrainMaterialC->getValue().asReal(); } -void LLFloaterPathfindingConsole::setTerrainMaterialC(F32 pTerrainMaterial) +void LLFloaterPathfindingSetup::setTerrainMaterialC(F32 pTerrainMaterial) { mTerrainMaterialC->setValue(LLSD(pTerrainMaterial)); } -F32 LLFloaterPathfindingConsole::getTerrainMaterialD() const +F32 LLFloaterPathfindingSetup::getTerrainMaterialD() const { return mTerrainMaterialD->getValue().asReal(); } -void LLFloaterPathfindingConsole::setTerrainMaterialD(F32 pTerrainMaterial) +void LLFloaterPathfindingSetup::setTerrainMaterialD(F32 pTerrainMaterial) { mTerrainMaterialD->setValue(LLSD(pTerrainMaterial)); } -void LLFloaterPathfindingConsole::setHasNavMeshReceived() +void LLFloaterPathfindingSetup::setHasNavMeshReceived() { std::string str = getString("navmesh_fetch_complete_available"); mPathfindingStatus->setText((LLStringExplicit)str); @@ -321,13 +321,13 @@ void LLFloaterPathfindingConsole::setHasNavMeshReceived() } } -void LLFloaterPathfindingConsole::setHasNoNavMesh() +void LLFloaterPathfindingSetup::setHasNoNavMesh() { std::string str = getString("navmesh_fetch_complete_none"); mPathfindingStatus->setText((LLStringExplicit)str); } -LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) +LLFloaterPathfindingSetup::LLFloaterPathfindingSetup(const LLSD& pSeed) : LLFloater(pSeed), mShowNavMeshCheckBox(NULL), mShowExcludeVolumesCheckBox(NULL), @@ -352,11 +352,11 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) } } -LLFloaterPathfindingConsole::~LLFloaterPathfindingConsole() +LLFloaterPathfindingSetup::~LLFloaterPathfindingSetup() { } -void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) +void LLFloaterPathfindingSetup::onOpen(const LLSD& pKey) { //make sure we have a pathing system if ( !LLPathingLib::getInstance() ) @@ -424,7 +424,7 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) } } -void LLFloaterPathfindingConsole::onShowNavMeshToggle() +void LLFloaterPathfindingSetup::onShowNavMeshToggle() { BOOL checkBoxValue = mShowNavMeshCheckBox->get(); @@ -440,7 +440,7 @@ void LLFloaterPathfindingConsole::onShowNavMeshToggle() } } -void LLFloaterPathfindingConsole::onShowExcludeVolumesToggle() +void LLFloaterPathfindingSetup::onShowExcludeVolumesToggle() { BOOL checkBoxValue = mShowExcludeVolumesCheckBox->get(); @@ -456,7 +456,7 @@ void LLFloaterPathfindingConsole::onShowExcludeVolumesToggle() } } -void LLFloaterPathfindingConsole::onShowPathToggle() +void LLFloaterPathfindingSetup::onShowPathToggle() { BOOL checkBoxValue = mShowPathCheckBox->get(); @@ -472,7 +472,7 @@ void LLFloaterPathfindingConsole::onShowPathToggle() } } -void LLFloaterPathfindingConsole::onShowWaterPlaneToggle() +void LLFloaterPathfindingSetup::onShowWaterPlaneToggle() { BOOL checkBoxValue = mShowWaterPlaneCheckBox->get(); @@ -492,7 +492,7 @@ void LLFloaterPathfindingConsole::onShowWaterPlaneToggle() << (checkBoxValue ? "ON" : "OFF") << llendl; } -void LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch() +void LLFloaterPathfindingSetup::onRegionOverlayDisplaySwitch() { LLPathingLib *llPathingLibInstance = LLPathingLib::getInstance(); if (llPathingLibInstance != NULL) @@ -518,7 +518,7 @@ void LLFloaterPathfindingConsole::onRegionOverlayDisplaySwitch() } } -void LLFloaterPathfindingConsole::onPathSelectionSwitch() +void LLFloaterPathfindingSetup::onPathSelectionSwitch() { switch (getPathSelectionState()) { @@ -534,12 +534,12 @@ void LLFloaterPathfindingConsole::onPathSelectionSwitch() } } -void LLFloaterPathfindingConsole::onCharacterWidthSet() +void LLFloaterPathfindingSetup::onCharacterWidthSet() { generatePath(); } -void LLFloaterPathfindingConsole::onCharacterTypeSwitch() +void LLFloaterPathfindingSetup::onCharacterTypeSwitch() { switch (getCharacterType()) { @@ -570,43 +570,43 @@ void LLFloaterPathfindingConsole::onCharacterTypeSwitch() } -void LLFloaterPathfindingConsole::onViewEditLinksetClicked() +void LLFloaterPathfindingSetup::onViewEditLinksetClicked() { LLFloaterPathfindingLinksets::openLinksetsEditor(); } -void LLFloaterPathfindingConsole::onRebuildNavMeshClicked() +void LLFloaterPathfindingSetup::onRebuildNavMeshClicked() { llwarns << "functionality has not yet been implemented to handle rebuilding of the navmesh" << llendl; } -void LLFloaterPathfindingConsole::onRefreshNavMeshClicked() +void LLFloaterPathfindingSetup::onRefreshNavMeshClicked() { llwarns << "functionality has not yet been implemented to handle refreshing of the navmesh" << llendl; } -void LLFloaterPathfindingConsole::onTerrainMaterialASet() +void LLFloaterPathfindingSetup::onTerrainMaterialASet() { F32 terrainMaterial = getTerrainMaterialA(); llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialA->getName() << "' to value (" << terrainMaterial << ")" << llendl; } -void LLFloaterPathfindingConsole::onTerrainMaterialBSet() +void LLFloaterPathfindingSetup::onTerrainMaterialBSet() { F32 terrainMaterial = getTerrainMaterialB(); llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialB->getName() << "' to value (" << terrainMaterial << ")" << llendl; } -void LLFloaterPathfindingConsole::onTerrainMaterialCSet() +void LLFloaterPathfindingSetup::onTerrainMaterialCSet() { F32 terrainMaterial = getTerrainMaterialC(); llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialC->getName() << "' to value (" << terrainMaterial << ")" << llendl; } -void LLFloaterPathfindingConsole::onTerrainMaterialDSet() +void LLFloaterPathfindingSetup::onTerrainMaterialDSet() { F32 terrainMaterial = getTerrainMaterialD(); llwarns << "functionality has not yet been implemented to setting '" << mTerrainMaterialD->getName() @@ -614,7 +614,7 @@ void LLFloaterPathfindingConsole::onTerrainMaterialDSet() } -void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, const LLVector3& point2 ) +void LLFloaterPathfindingSetup::providePathingData( const LLVector3& point1, const LLVector3& point2 ) { switch (getPathSelectionState()) { @@ -644,7 +644,7 @@ void LLFloaterPathfindingConsole::providePathingData( const LLVector3& point1, c generatePath(); } -void LLFloaterPathfindingConsole::generatePath() +void LLFloaterPathfindingSetup::generatePath() { if (mHasStartPoint && mHasEndPoint) { diff --git a/indra/newview/llfloaterpathfindingconsole.h b/indra/newview/llfloaterpathfindingsetup.h index f62fd9742b..edb7072b28 100644 --- a/indra/newview/llfloaterpathfindingconsole.h +++ b/indra/newview/llfloaterpathfindingsetup.h @@ -1,5 +1,5 @@ /** - * @file llfloaterpathfindingconsole.h + * @file llfloaterpathfindingsetup.h * @author William Todd Stinson * @brief "Pathfinding console" floater, allowing manipulation of the Havok AI pathfinding settings. * @@ -25,8 +25,8 @@ * $/LicenseInfo$ */ -#ifndef LL_LLFLOATERPATHFINDINGCONSOLE_H -#define LL_LLFLOATERPATHFINDINGCONSOLE_H +#ifndef LL_LLFLOATERPATHFINDINGSETUP_H +#define LL_LLFLOATERPATHFINDINGSETUP_H #include "llfloater.h" #include "llnavmeshstation.h" @@ -39,7 +39,7 @@ class LLLineEditor; class LLTextBase; class LLCheckBoxCtrl; -class LLFloaterPathfindingConsole +class LLFloaterPathfindingSetup : public LLFloater { friend class LLFloaterReg; @@ -102,8 +102,8 @@ protected: private: // Does its own instance management, so clients not allowed // to allocate or destroy. - LLFloaterPathfindingConsole(const LLSD& pSeed); - virtual ~LLFloaterPathfindingConsole(); + LLFloaterPathfindingSetup(const LLSD& pSeed); + virtual ~LLFloaterPathfindingSetup(); virtual void onOpen(const LLSD& pKey); @@ -148,4 +148,4 @@ private: bool mHasEndPoint; }; -#endif // LL_LLFLOATERPATHFINDINGCONSOLE_H +#endif // LL_LLFLOATERPATHFINDINGSETUP_H diff --git a/indra/newview/llnavmeshstation.cpp b/indra/newview/llnavmeshstation.cpp index 87f7e92ddd..16f459ff84 100644 --- a/indra/newview/llnavmeshstation.cpp +++ b/indra/newview/llnavmeshstation.cpp @@ -31,7 +31,7 @@ #include "llagent.h" #include "llviewerregion.h" #include "llsdutil.h" -#include "llfloaterpathfindingconsole.h" +#include "llfloaterpathfindingsetup.h" //=============================================================================== LLNavMeshStation::LLNavMeshStation() diff --git a/indra/newview/llnavmeshstation.h b/indra/newview/llnavmeshstation.h index 72bf725688..0aa714dac8 100644 --- a/indra/newview/llnavmeshstation.h +++ b/indra/newview/llnavmeshstation.h @@ -31,7 +31,7 @@ #include "llhandle.h" //=============================================================================== class LLCurlRequest; -class LLFloaterPathfindingConsole; +class LLFloaterPathfindingSetup; //=============================================================================== class LLNavMeshObserver { @@ -44,12 +44,12 @@ public: virtual ~LLNavMeshObserver() {} //Accessor for the observers handle const LLHandle<LLNavMeshObserver>& getObserverHandle() const { return mObserverHandle; } - LLFloaterPathfindingConsole *getPathfindingConsole() {return mPathfindingConsole;} - void setPathfindingConsole(LLFloaterPathfindingConsole *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;} + LLFloaterPathfindingSetup *getPathfindingConsole() {return mPathfindingConsole;} + void setPathfindingConsole(LLFloaterPathfindingSetup *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;} protected: LLRootHandle<LLNavMeshObserver> mObserverHandle; - LLFloaterPathfindingConsole *mPathfindingConsole; + LLFloaterPathfindingSetup *mPathfindingConsole; }; //=============================================================================== class LLNavMeshDownloadObserver @@ -61,12 +61,12 @@ public: virtual ~LLNavMeshDownloadObserver() {} //Accessor for the observers handle const LLHandle<LLNavMeshDownloadObserver>& getObserverHandle() const { return mObserverHandle; } - LLFloaterPathfindingConsole *getPathfindingConsole() {return mPathfindingConsole;} - void setPathfindingConsole(LLFloaterPathfindingConsole *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;} + LLFloaterPathfindingSetup *getPathfindingConsole() {return mPathfindingConsole;} + void setPathfindingConsole(LLFloaterPathfindingSetup *pPathfindingConsole) {mPathfindingConsole = pPathfindingConsole;} protected: LLRootHandle<LLNavMeshDownloadObserver> mObserverHandle; - LLFloaterPathfindingConsole *mPathfindingConsole; + LLFloaterPathfindingSetup *mPathfindingConsole; }; //=============================================================================== class LLNavMeshStation : public LLSingleton<LLNavMeshStation> diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 12eea7844d..1b629f515b 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -68,6 +68,7 @@ #include "llworld.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "llradiogroup.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -158,6 +159,14 @@ BOOL LLPanelVolume::postBuild() mSpinPhysicsRestitution->setCommitCallback(boost::bind(&LLPanelVolume::sendPhysicsRestitution, this, _1, mSpinPhysicsRestitution)); } + // Pathfinding Parameters + { + // Pathfinding state + mPathfindingType = findChild<LLRadioGroup>("edit_pathfinding_state"); + llassert(mPathfindingType != NULL); + mPathfindingType->setCommitCallback(boost::bind(&LLPanelVolume::sendPathfindingType, this)); + } + std::map<std::string, std::string> material_name_map; material_name_map["Stone"]= LLTrans::getString("Stone"); material_name_map["Metal"]= LLTrans::getString("Metal"); @@ -194,7 +203,8 @@ BOOL LLPanelVolume::postBuild() LLPanelVolume::LLPanelVolume() : LLPanel(), - mComboMaterialItemCount(0) + mComboMaterialItemCount(0), + mPathfindingType(NULL) { setMouseOpaque(FALSE); @@ -463,6 +473,8 @@ void LLPanelVolume::getState( ) mSpinPhysicsRestitution->set(objectp->getPhysicsRestitution()); mSpinPhysicsRestitution->setEnabled(editable); + mPathfindingType->setEnabled(editable); + // update the physics shape combo to include allowed physics shapes mComboPhysicsShapeType->removeall(); mComboPhysicsShapeType->add(getString("None"), LLSD(1)); @@ -546,6 +558,8 @@ void LLPanelVolume::refresh() getChildView("Physics Friction")->setVisible(enable_mesh); getChildView("Physics Density")->setVisible(enable_mesh); getChildView("Physics Restitution")->setVisible(enable_mesh); + + mPathfindingType->setVisible(enable_mesh); /* TODO: add/remove individual physics shape types as per the PhysicsShapeTypes simulator features */ } @@ -600,6 +614,8 @@ void LLPanelVolume::clearCtrls() mSpinPhysicsDensity->setEnabled(FALSE); mSpinPhysicsRestitution->setEnabled(FALSE); + mPathfindingType->setEnabled(FALSE); + mComboMaterial->setEnabled( FALSE ); } @@ -685,6 +701,12 @@ void LLPanelVolume::sendPhysicsDensity(LLUICtrl* ctrl, void* userdata) LLSelectMgr::getInstance()->selectionSetDensity(val); } +void LLPanelVolume::sendPathfindingType() +{ + S32 val = mPathfindingType->getValue().asInteger(); + llwarns << "functionality to set '" << mPathfindingType->getName() << "' to value " << val << " has not been implemented." << llendl; +} + void LLPanelVolume::refreshCost() { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h index 0ef47db0d9..ae66414b0f 100644 --- a/indra/newview/llpanelvolume.h +++ b/indra/newview/llpanelvolume.h @@ -40,6 +40,7 @@ class LLButton; class LLViewerObject; class LLComboBox; class LLColorSwatchCtrl; +class LLRadioGroup; class LLPanelVolume : public LLPanel { @@ -84,6 +85,8 @@ protected: void sendPhysicsRestitution(LLUICtrl* ctrl, void* userdata); void sendPhysicsDensity(LLUICtrl* ctrl, void* userdata); + void sendPathfindingType(); + /* LLTextBox* mLabelSelectSingleMessage; // Light @@ -118,6 +121,8 @@ protected: LLSpinCtrl* mSpinPhysicsFriction; LLSpinCtrl* mSpinPhysicsDensity; LLSpinCtrl* mSpinPhysicsRestitution; + + LLRadioGroup* mPathfindingType; }; #endif diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 3e21334cd4..719f560101 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -78,7 +78,7 @@ #include "llwaterparammanager.h" #include "llpostprocess.h" #include "LLPathingLib.h" -#include "llfloaterpathfindingconsole.h" +#include "llfloaterpathfindingsetup.h" #include "llfloaterreg.h" extern LLPointer<LLViewerTexture> gStartTexture; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0a3bb2f4ba..837db1550b 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -84,7 +84,7 @@ #include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloateroutbox.h" -#include "llfloaterpathfindingconsole.h" +#include "llfloaterpathfindingsetup.h" #include "llfloaterpathfindinglinksets.h" #include "llfloaterpay.h" #include "llfloaterperms.h" @@ -245,8 +245,8 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("outgoing_call", "floater_outgoing_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutgoingCallDialog>); LLFloaterPayUtil::registerFloater(); - LLFloaterReg::add("pathfinding_console", "floater_pathfinding_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingConsole>); LLFloaterReg::add("pathfinding_linksets", "floater_pathfinding_linksets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingLinksets>); + LLFloaterReg::add("pathfinding_setup", "floater_pathfinding_setup.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPathfindingSetup>); LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>); LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPreference>); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ab03463bbc..487f849ada 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -204,7 +204,7 @@ #include "llviewerwindowlistener.h" #include "llpaneltopinfobar.h" #include "LLPathingLib.h" -#include "llfloaterpathfindingconsole.h" +#include "llfloaterpathfindingsetup.h" #if LL_WINDOWS #include <tchar.h> // For Unicode conversion methods @@ -964,7 +964,7 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK MASK currentKeyMask = gKeyboard->currentMask(TRUE); if ( !(currentKeyMask & MASK_ALT) ) { - LLFloaterPathfindingConsole* pFloater = LLFloaterReg::getTypedInstance<LLFloaterPathfindingConsole>("pathfinding_console"); + LLFloaterPathfindingSetup* pFloater = LLFloaterReg::getTypedInstance<LLFloaterPathfindingSetup>("pathfinding_setup"); if ( pFloater ) { //The floater takes care of determining what stage - essentially where the data goes into the pathing packet(start or end) diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_setup.xml index 7b751d525f..37555eea3a 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_console.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_setup.xml @@ -9,7 +9,7 @@ reuse_instance="true" save_rect="true" single_instance="true" - title="Pathfinding" + title="Pathfinding setup" width="833"> <floater.string name="navmesh_fetch_initial"></floater.string> <floater.string name="navmesh_fetch_inprogress">Downloading the navmesh ...</floater.string> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index f9147ea650..b8ed10b339 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2401,6 +2401,46 @@ even though the user gets a free copy. name="Physics Restitution" top_pad="8" width="132" /> + <text + type="string" + length="1" + follows="left|top" + height="10" + layout="topleft" + left_delta="0" + top_delta="45" + name="pathfinding_type_label" + width="121"> + Pathfinding Type: + </text> + <radio_group + follows="top|left" + height="55" + layout="topleft" + name="edit_pathfinding_state" + left_delta="0" + top_delta="15" + value="1" + width="75"> + <radio_item + label="Walkable" + layout="topleft" + height="13" + name="edit_pathfinding_state_walkable" + value="1"/> + <radio_item + label="Obstacle" + layout="topleft" + height="13" + name="edit_pathfinding_state_obstacle" + value="2"/> + <radio_item + label="Ignored" + layout="topleft" + height="13" + name="edit_pathfinding_state_ignored" + value="3"/> + </radio_group> </panel> <panel border="false" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 54477f2cb7..f952fc3266 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -938,15 +938,37 @@ </menu_item_call> </menu> + <menu + create_jump_keys="true" + label="Pathfinding" + name="Pathfindubg" + tear_off="false"> <menu_item_call - label="Pathfinding..." - name="pathfinding_menu_item"> - <menu_item_call.on_click - function="Floater.ToggleOrBringToFront" - parameter="pathfinding_console" /> + label="Setup..." + name="pathfinding_setup_menu_item"> + <menu_item_call.on_click + function="Floater.ToggleOrBringToFront" + parameter="pathfinding_setup" /> + </menu_item_call> + <menu_item_call + label="Linksets..." + name="pathfinding_linksets_menu_item"> + <menu_item_call.on_click + function="Floater.ToggleOrBringToFront" + parameter="pathfinding_linksets" /> </menu_item_call> + <menu_item_call + label="Characters..." + enabled="false" + name="pathfinding_characters_menu_item"> + <menu_item_call.on_click + function="Floater.ToggleOrBringToFront" + parameter="pathfinding_linksets" /> + </menu_item_call> + </menu> - <menu_item_separator/> + + <menu_item_separator/> <menu create_jump_keys="true" |