diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 10:55:19 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-05-12 10:55:19 +0100 |
commit | 7059173aa920e9c8d1939a0ec9558fc79cbfb3ed (patch) | |
tree | 1e66e2083ad73fcdbc0a76ecf95c33fb20bc63ee /indra/newview/llpaneleditwearable.cpp | |
parent | 489a5eb9e20256da64749e85254b9511e0919607 (diff) | |
parent | 9ab4d2ca8be2edcafa6cdfc3bd774ebaed444dc8 (diff) |
merge from PE's viewer-trunk
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rw-r--r-- | indra/newview/llpaneleditwearable.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index 6f2e7c0b20..5aeb3ffc82 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -635,6 +635,8 @@ BOOL LLPanelEditWearable::postBuild() mPanelAlpha = getChild<LLPanel>("edit_alpha_panel"); mPanelTattoo = getChild<LLPanel>("edit_tattoo_panel"); + mTxtAvatarHeight = mPanelShape->getChild<LLTextBox>("avatar_height"); + mWearablePtr = NULL; return TRUE; @@ -661,7 +663,9 @@ void LLPanelEditWearable::draw() updateVerbs(); if (getWearable()) { - updatePanelPickerControls(getWearable()->getType()); + EWearableType type = getWearable()->getType(); + updatePanelPickerControls(type); + updateTypeSpecificControls(type); } LLPanel::draw(); @@ -864,6 +868,9 @@ void LLPanelEditWearable::initializePanel() // set name mTextEditor->setText(mWearablePtr->getName()); + // toggle wearable type-specific controls + toggleTypeSpecificControls(type); + // clear and rebuild visual param list const LLEditWearableDictionary::WearableEntry *wearable_entry = LLEditWearableDictionary::getInstance()->getWearable(type); if (!wearable_entry) @@ -922,6 +929,28 @@ void LLPanelEditWearable::initializePanel() updateVerbs(); } +void LLPanelEditWearable::toggleTypeSpecificControls(EWearableType type) +{ + // Toggle controls specific to shape editing panel. + { + bool is_shape = (type == WT_SHAPE); + childSetVisible("sex_radio", is_shape); + childSetVisible("female_icon", is_shape); + childSetVisible("male_icon", is_shape); + } +} + +void LLPanelEditWearable::updateTypeSpecificControls(EWearableType type) +{ + // Update controls specific to shape editing panel. + if (type == WT_SHAPE) + { + // Update avatar height + std::string avatar_height_str = llformat("%.2f", gAgentAvatarp->mBodySize.mV[VZ]); + mTxtAvatarHeight->setTextArg("[HEIGHT]", avatar_height_str); + } +} + void LLPanelEditWearable::updateScrollingPanelUI() { // do nothing if we don't have a valid wearable we're editing |