summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-02-01 17:40:16 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-02-01 17:40:16 -0800
commit2beb9c1903bc4164fe9e57c4a2eb1cc42d413ef4 (patch)
treec10fadc46dde9b7dd6a492ef714ed16bdf0d1856 /indra/newview
parent28be2c4364f673f321bf8b738d69319ea9b4e8e5 (diff)
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.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelvolume.cpp24
-rw-r--r--indra/newview/llpanelvolume.h5
-rw-r--r--indra/newview/skins/default/xui/en/floater_tools.xml40
3 files changed, 68 insertions, 1 deletions
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/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"