diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-26 16:52:32 +0300 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-08-26 16:52:32 +0300 |
| commit | 19fb0a16695b57e70dc371471d37c16929f1c424 (patch) | |
| tree | 39f16d806b66e3795ded41c1462e205404996046 /indra/newview/llfloatersettingsdebug.cpp | |
| parent | 8e56f063924601041bac3791e794fa6934f20936 (diff) | |
| parent | 1a8d917a6d0d2393a0f0248d0072dd7cfd487609 (diff) | |
Manual merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfloatersettingsdebug.cpp')
| -rw-r--r-- | indra/newview/llfloatersettingsdebug.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 3bd5e900b4..41a05055fe 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -121,49 +121,49 @@ void LLFloaterSettingsDebug::onCommitSettings() switch(controlp->type()) { case TYPE_U32: - controlp->set(childGetValue("val_spinner_1")); + controlp->set(getChild<LLUICtrl>("val_spinner_1")->getValue()); break; case TYPE_S32: - controlp->set(childGetValue("val_spinner_1")); + controlp->set(getChild<LLUICtrl>("val_spinner_1")->getValue()); break; case TYPE_F32: - controlp->set(LLSD(childGetValue("val_spinner_1").asReal())); + controlp->set(LLSD(getChild<LLUICtrl>("val_spinner_1")->getValue().asReal())); break; case TYPE_BOOLEAN: - controlp->set(childGetValue("boolean_combo")); + controlp->set(getChild<LLUICtrl>("boolean_combo")->getValue()); break; case TYPE_STRING: - controlp->set(LLSD(childGetValue("val_text").asString())); + controlp->set(LLSD(getChild<LLUICtrl>("val_text")->getValue().asString())); break; case TYPE_VEC3: - vector.mV[VX] = (F32)childGetValue("val_spinner_1").asReal(); - vector.mV[VY] = (F32)childGetValue("val_spinner_2").asReal(); - vector.mV[VZ] = (F32)childGetValue("val_spinner_3").asReal(); + vector.mV[VX] = (F32)getChild<LLUICtrl>("val_spinner_1")->getValue().asReal(); + vector.mV[VY] = (F32)getChild<LLUICtrl>("val_spinner_2")->getValue().asReal(); + vector.mV[VZ] = (F32)getChild<LLUICtrl>("val_spinner_3")->getValue().asReal(); controlp->set(vector.getValue()); break; case TYPE_VEC3D: - vectord.mdV[VX] = childGetValue("val_spinner_1").asReal(); - vectord.mdV[VY] = childGetValue("val_spinner_2").asReal(); - vectord.mdV[VZ] = childGetValue("val_spinner_3").asReal(); + vectord.mdV[VX] = getChild<LLUICtrl>("val_spinner_1")->getValue().asReal(); + vectord.mdV[VY] = getChild<LLUICtrl>("val_spinner_2")->getValue().asReal(); + vectord.mdV[VZ] = getChild<LLUICtrl>("val_spinner_3")->getValue().asReal(); controlp->set(vectord.getValue()); break; case TYPE_RECT: - rect.mLeft = childGetValue("val_spinner_1").asInteger(); - rect.mRight = childGetValue("val_spinner_2").asInteger(); - rect.mBottom = childGetValue("val_spinner_3").asInteger(); - rect.mTop = childGetValue("val_spinner_4").asInteger(); + rect.mLeft = getChild<LLUICtrl>("val_spinner_1")->getValue().asInteger(); + rect.mRight = getChild<LLUICtrl>("val_spinner_2")->getValue().asInteger(); + rect.mBottom = getChild<LLUICtrl>("val_spinner_3")->getValue().asInteger(); + rect.mTop = getChild<LLUICtrl>("val_spinner_4")->getValue().asInteger(); controlp->set(rect.getValue()); break; case TYPE_COL4: - col3.setValue(childGetValue("val_color_swatch")); - col4 = LLColor4(col3, (F32)childGetValue("val_spinner_4").asReal()); + col3.setValue(getChild<LLUICtrl>("val_color_swatch")->getValue()); + col4 = LLColor4(col3, (F32)getChild<LLUICtrl>("val_spinner_4")->getValue().asReal()); controlp->set(col4.getValue()); break; case TYPE_COL3: - controlp->set(childGetValue("val_color_swatch")); - //col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC(); - //col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); - //col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); + controlp->set(getChild<LLUICtrl>("val_color_swatch")->getValue()); + //col3.mV[VRED] = (F32)floaterp->getChild<LLUICtrl>("val_spinner_1")->getValue().asC(); + //col3.mV[VGREEN] = (F32)floaterp->getChild<LLUICtrl>("val_spinner_2")->getValue().asReal(); + //col3.mV[VBLUE] = (F32)floaterp->getChild<LLUICtrl>("val_spinner_3")->getValue().asReal(); //controlp->set(col3.getValue()); break; default: @@ -205,7 +205,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) spinner3->setVisible(FALSE); spinner4->setVisible(FALSE); color_swatch->setVisible(FALSE); - childSetVisible("val_text", FALSE); + getChildView("val_text")->setVisible( FALSE); mComment->setText(LLStringUtil::null); if (controlp) @@ -213,7 +213,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) eControlType type = controlp->type(); //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame - childSetVisible("boolean_combo", type == TYPE_BOOLEAN); + getChildView("boolean_combo")->setVisible( type == TYPE_BOOLEAN); mComment->setText(controlp->getComment()); @@ -279,23 +279,23 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) } break; case TYPE_BOOLEAN: - if (!childHasFocus("boolean_combo")) + if (!getChild<LLUICtrl>("boolean_combo")->hasFocus()) { if (sd.asBoolean()) { - childSetValue("boolean_combo", LLSD("true")); + getChild<LLUICtrl>("boolean_combo")->setValue(LLSD("true")); } else { - childSetValue("boolean_combo", LLSD("")); + getChild<LLUICtrl>("boolean_combo")->setValue(LLSD("")); } } break; case TYPE_STRING: - childSetVisible("val_text", TRUE); - if (!childHasFocus("val_text")) + getChildView("val_text")->setVisible( TRUE); + if (!getChild<LLUICtrl>("val_text")->hasFocus()) { - childSetValue("val_text", sd); + getChild<LLUICtrl>("val_text")->setValue(sd); } break; case TYPE_VEC3: |
