Display pathfinding attributes in build floater.

This commit is contained in:
Shyotl
2012-08-06 12:26:28 -05:00
parent 58033d3cbc
commit 1a6c00ca8b
6 changed files with 149 additions and 17 deletions

View File

@@ -83,13 +83,17 @@
#include "llviewercontrol.h"
#include "llmeshrepository.h"
#include "llnotificationsutil.h"
#include <boost/bind.hpp>
// "Features" Tab
BOOL LLPanelVolume::postBuild()
{
// Flexible Objects Parameters
{
childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this);
getChild<LLCheckboxCtrl>("Flexible1D Checkbox Ctrl")->setCommitCallback(boost::bind(&LLPanelVolume::onCommitIsFlexible, this, _1, _2), NULL);
childSetCommitCallback("FlexNumSections",onCommitFlexible,this);
getChild<LLUICtrl>("FlexNumSections")->setValidateBeforeCommit(precommitValidate);
childSetCommitCallback("FlexGravity",onCommitFlexible,this);
@@ -810,10 +814,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<LLUICtrl>("Flexible1D Checkbox Ctrl")->setValue(FALSE);
}
}