diff options
| -rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.cpp | 44 | ||||
| -rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.h | 6 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml | 10 | 
3 files changed, 57 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
  //---------------------------------------------------------------------------
 diff --git a/indra/newview/llfloaterpathfindinglinksets.h b/indra/newview/llfloaterpathfindinglinksets.h index f9d747b9fe..43f4c3819f 100644 --- a/indra/newview/llfloaterpathfindinglinksets.h +++ b/indra/newview/llfloaterpathfindinglinksets.h @@ -197,6 +197,11 @@ private:  	LLCheckBoxCtrl      *mEditFixed;
  	LLCheckBoxCtrl      *mEditWalkable;
  	LLCheckBoxCtrl      *mEditPhantom;
 +	LLTextBase          *mLabelWalkabilityCoefficients;
 +	LLTextBase          *mLabelEditA;
 +	LLTextBase          *mLabelEditB;
 +	LLTextBase          *mLabelEditC;
 +	LLTextBase          *mLabelEditD;
  	LLLineEditor        *mEditA;
  	LLLineEditor        *mEditB;
  	LLLineEditor        *mEditC;
 @@ -232,6 +237,7 @@ private:  	void updateEditFields();
  	void applyEditFields();
 +	void setEnableEditFields(BOOL pEnabled);
  };
  #endif // LL_LLFLOATERPATHFINDINGLINKSETS_H
 diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml index 21711880af..53edf5294c 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml @@ -263,6 +263,8 @@        use_ellipses="false"        type="string"        text_color="LabelTextColor" +      text_readonly_color="LabelDisabledColor" +      name="walkability_coefficients_label"        length="1"        follows="left|top"        layout="topleft" @@ -277,6 +279,8 @@        use_ellipses="false"        type="string"        text_color="LabelTextColor" +      text_readonly_color="LabelDisabledColor" +      name="edit_a_label"        length="1"        follows="left|top"        layout="topleft" @@ -300,6 +304,8 @@        use_ellipses="false"        type="string"        text_color="LabelTextColor" +      text_readonly_color="LabelDisabledColor" +      name="edit_b_label"        length="1"        follows="left|top"        layout="topleft" @@ -324,6 +330,8 @@        use_ellipses="false"        type="string"        text_color="LabelTextColor" +      text_readonly_color="LabelDisabledColor" +      name="edit_c_label"        length="1"        follows="left|top"        layout="topleft" @@ -348,6 +356,8 @@        use_ellipses="false"        type="string"        text_color="LabelTextColor" +      text_readonly_color="LabelDisabledColor" +      name="edit_d_label"        length="1"        follows="left|top"        layout="topleft"  | 
