From 2beb9c1903bc4164fe9e57c4a2eb1cc42d413ef4 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 1 Feb 2012 17:40:16 -0800 Subject: PATH-198: Laid out the pathfinding buttons per Leo's design. Functionality is currently hooked up to stubs that report a warning message about lack of implementation. --- indra/newview/llpanelvolume.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llpanelvolume.h') 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 -- cgit v1.3 From 942c17224d5f299950abc1fbb83d1528c50b3ab2 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 15 Feb 2012 17:09:10 -0800 Subject: Backing out changeset: dda75e2e00e5 --- indra/newview/llpanelvolume.cpp | 24 +------------ indra/newview/llpanelvolume.h | 5 --- .../newview/skins/default/xui/en/floater_tools.xml | 40 ---------------------- 3 files changed, 1 insertion(+), 68 deletions(-) (limited to 'indra/newview/llpanelvolume.h') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 1b629f515b..12eea7844d 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -68,7 +68,6 @@ #include "llworld.h" #include "pipeline.h" #include "llviewershadermgr.h" -#include "llradiogroup.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -159,14 +158,6 @@ BOOL LLPanelVolume::postBuild() mSpinPhysicsRestitution->setCommitCallback(boost::bind(&LLPanelVolume::sendPhysicsRestitution, this, _1, mSpinPhysicsRestitution)); } - // Pathfinding Parameters - { - // Pathfinding state - mPathfindingType = findChild("edit_pathfinding_state"); - llassert(mPathfindingType != NULL); - mPathfindingType->setCommitCallback(boost::bind(&LLPanelVolume::sendPathfindingType, this)); - } - std::map material_name_map; material_name_map["Stone"]= LLTrans::getString("Stone"); material_name_map["Metal"]= LLTrans::getString("Metal"); @@ -203,8 +194,7 @@ BOOL LLPanelVolume::postBuild() LLPanelVolume::LLPanelVolume() : LLPanel(), - mComboMaterialItemCount(0), - mPathfindingType(NULL) + mComboMaterialItemCount(0) { setMouseOpaque(FALSE); @@ -473,8 +463,6 @@ 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)); @@ -558,8 +546,6 @@ 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 */ } @@ -614,8 +600,6 @@ void LLPanelVolume::clearCtrls() mSpinPhysicsDensity->setEnabled(FALSE); mSpinPhysicsRestitution->setEnabled(FALSE); - mPathfindingType->setEnabled(FALSE); - mComboMaterial->setEnabled( FALSE ); } @@ -701,12 +685,6 @@ 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 ae66414b0f..0ef47db0d9 100644 --- a/indra/newview/llpanelvolume.h +++ b/indra/newview/llpanelvolume.h @@ -40,7 +40,6 @@ class LLButton; class LLViewerObject; class LLComboBox; class LLColorSwatchCtrl; -class LLRadioGroup; class LLPanelVolume : public LLPanel { @@ -85,8 +84,6 @@ protected: void sendPhysicsRestitution(LLUICtrl* ctrl, void* userdata); void sendPhysicsDensity(LLUICtrl* ctrl, void* userdata); - void sendPathfindingType(); - /* LLTextBox* mLabelSelectSingleMessage; // Light @@ -121,8 +118,6 @@ protected: LLSpinCtrl* mSpinPhysicsFriction; LLSpinCtrl* mSpinPhysicsDensity; LLSpinCtrl* mSpinPhysicsRestitution; - - LLRadioGroup* mPathfindingType; }; #endif diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index b8ed10b339..f9147ea650 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2401,46 +2401,6 @@ even though the user gets a free copy. name="Physics Restitution" top_pad="8" width="132" /> - - Pathfinding Type: - - - - - - Date: Tue, 3 Apr 2012 18:41:31 -0700 Subject: PATH-454: BUGFIX Adding a notification when switching a permanent object to Flexible Path. --- indra/newview/llpanelvolume.cpp | 29 ++++++++++++++++++---- indra/newview/llpanelvolume.h | 4 ++- .../newview/skins/default/xui/en/notifications.xml | 13 ++++++++++ 3 files changed, 40 insertions(+), 6 deletions(-) (limited to 'indra/newview/llpanelvolume.h') diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 557daeaec2..d277ded636 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 "llnotificationsutil.h" #include "lldrawpool.h" #include "lluictrlfactory.h" @@ -77,13 +78,15 @@ #include "llviewercontrol.h" #include "llmeshrepository.h" +#include + // "Features" Tab BOOL LLPanelVolume::postBuild() { // Flexible Objects Parameters { - childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this); + childSetCommitCallback("Flexible1D Checkbox Ctrl", boost::bind(&LLPanelVolume::onCommitIsFlexible, this, _1, _2), NULL); childSetCommitCallback("FlexNumSections",onCommitFlexible,this); getChild("FlexNumSections")->setValidateBeforeCommit(precommitValidate); childSetCommitCallback("FlexGravity",onCommitFlexible,this); @@ -873,10 +876,26 @@ void LLPanelVolume::onCommitFlexible( LLUICtrl* ctrl, void* userdata ) self->refresh(); } -// static -void LLPanelVolume::onCommitIsFlexible( LLUICtrl* ctrl, void* userdata ) +void LLPanelVolume::onCommitIsFlexible(LLUICtrl *, void*) { - LLPanelVolume* self = (LLPanelVolume*) userdata; - self->sendIsFlexible(); + if (mObject->flagObjectPermanent()) + { + LLNotificationsUtil::add("PathfindingLinksets_ChangeToFlexiblePath", LLSD(), LLSD(), boost::bind(&LLPanelVolume::handleResponseChangeToFlexible, this, _1, _2)); + } + else + { + sendIsFlexible(); + } } +void LLPanelVolume::handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse) +{ + if (LLNotificationsUtil::getSelectedOption(pNotification, pResponse) == 0) + { + sendIsFlexible(); + } + else + { + getChild("Flexible1D Checkbox Ctrl")->setValue(FALSE); + } +} diff --git a/indra/newview/llpanelvolume.h b/indra/newview/llpanelvolume.h index 0ef47db0d9..deb6b6f2a6 100644 --- a/indra/newview/llpanelvolume.h +++ b/indra/newview/llpanelvolume.h @@ -61,7 +61,7 @@ public: static void onCommitIsLight( LLUICtrl* ctrl, void* userdata); static void onCommitLight( LLUICtrl* ctrl, void* userdata); - static void onCommitIsFlexible( LLUICtrl* ctrl, void* userdata); + void onCommitIsFlexible( LLUICtrl* ctrl, void* userdata); static void onCommitFlexible( LLUICtrl* ctrl, void* userdata); static void onCommitPhysicsParam( LLUICtrl* ctrl, void* userdata); static void onCommitMaterial( LLUICtrl* ctrl, void* userdata); @@ -84,6 +84,8 @@ protected: void sendPhysicsRestitution(LLUICtrl* ctrl, void* userdata); void sendPhysicsDensity(LLUICtrl* ctrl, void* userdata); + void handleResponseChangeToFlexible(const LLSD &pNotification, const LLSD &pResponse); + /* LLTextBox* mLabelSelectSingleMessage; // Light diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index e1a7c6309d..3b03bc0aed 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7722,6 +7722,19 @@ The site at '<nolink>[HOST_NAME]</nolink>' in realm ' yestext="OK"/> + + The selected object is marked as permanent and is included in the navmesh. Setting the object to be a Flexible Path will unset the permanent value and remove the object from the navmesh. Do you wish to proceed? + confirm + + + You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system. -- cgit v1.3