diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-01-17 17:31:46 -0800 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-01-17 17:31:46 -0800 |
commit | 7e213192a2b799e0b3d8590bbc5c81c80a2ee0fa (patch) | |
tree | 17bf6541e71afd23d611584a9ebe8fa825c084b2 /indra/newview/llfloaterpathfindinglinksets.cpp | |
parent | 8cf6b9cb929ff37fc6febe1f4ede4efa526260d9 (diff) |
PATH-186: Enabling and disabling the edit fields based on whether linksets are selected.
Diffstat (limited to 'indra/newview/llfloaterpathfindinglinksets.cpp')
-rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.cpp | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 11211feb43..732427103f 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -560,6 +560,21 @@ BOOL LLFloaterPathfindingLinksets::postBuild() mEditPhantom = findChild<LLCheckBoxCtrl>("edit_phantom_value");
llassert(mEditPhantom != NULL);
+ mLabelWalkabilityCoefficients = findChild<LLTextBase>("walkability_coefficients_label");
+ llassert(mLabelWalkabilityCoefficients != NULL);
+
+ mLabelEditA = findChild<LLTextBase>("edit_a_label");
+ llassert(mLabelEditA != NULL);
+
+ mLabelEditB = findChild<LLTextBase>("edit_b_label");
+ llassert(mLabelEditB != NULL);
+
+ mLabelEditC = findChild<LLTextBase>("edit_c_label");
+ llassert(mLabelEditC != NULL);
+
+ mLabelEditD = findChild<LLTextBase>("edit_d_label");
+ llassert(mLabelEditD != NULL);
+
mEditA = findChild<LLLineEditor>("edit_a_value");
llassert(mEditA != NULL);
mEditA->setPrevalidate(LLTextValidate::validateFloat);
@@ -579,8 +594,8 @@ BOOL LLFloaterPathfindingLinksets::postBuild() mApplyEdits = findChild<LLButton>("apply_edit_values");
llassert(mApplyEdits != NULL);
mApplyEdits->setCommitCallback(boost::bind(&LLFloaterPathfindingLinksets::onApplyChangesClicked, this));
- mApplyEdits->setEnabled(false);
+ setEnableEditFields(false);
setFetchState(kFetchInitial);
return LLFloater::postBuild();
@@ -632,6 +647,12 @@ LLFloaterPathfindingLinksets::LLFloaterPathfindingLinksets(const LLSD& pSeed) mFilterByWalkable(NULL),
mEditFixed(NULL),
mEditWalkable(NULL),
+ mEditPhantom(NULL),
+ mLabelWalkabilityCoefficients(NULL),
+ mLabelEditA(NULL),
+ mLabelEditB(NULL),
+ mLabelEditC(NULL),
+ mLabelEditD(NULL),
mEditA(NULL),
mEditB(NULL),
mEditC(NULL),
@@ -1054,7 +1075,7 @@ void LLFloaterPathfindingLinksets::updateEditFields() mEditC->clear();
mEditD->clear();
- mApplyEdits->setEnabled(false);
+ setEnableEditFields(false);
}
else
{
@@ -1072,7 +1093,7 @@ void LLFloaterPathfindingLinksets::updateEditFields() mEditC->setValue(LLSD(linkset.getC()));
mEditD->setValue(LLSD(linkset.getD()));
- mApplyEdits->setEnabled(true);
+ setEnableEditFields(true);
}
}
@@ -1118,6 +1139,23 @@ void LLFloaterPathfindingLinksets::applyEditFields() llinfos << " applyData: " << applyData << llendl;
}
+void LLFloaterPathfindingLinksets::setEnableEditFields(BOOL pEnabled)
+{
+ mEditFixed->setEnabled(pEnabled);
+ mEditWalkable->setEnabled(pEnabled);
+ mEditPhantom->setEnabled(pEnabled);
+ mLabelWalkabilityCoefficients->setEnabled(pEnabled);
+ mLabelEditA->setEnabled(pEnabled);
+ mLabelEditB->setEnabled(pEnabled);
+ mLabelEditC->setEnabled(pEnabled);
+ mLabelEditD->setEnabled(pEnabled);
+ mEditA->setEnabled(pEnabled);
+ mEditB->setEnabled(pEnabled);
+ mEditC->setEnabled(pEnabled);
+ mEditD->setEnabled(pEnabled);
+ mApplyEdits->setEnabled(pEnabled);
+}
+
//---------------------------------------------------------------------------
// NavmeshDataGetResponder
//---------------------------------------------------------------------------
|