summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneleditwearable.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-05-11 23:04:43 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-05-11 23:04:43 +0300
commitb24dfb72c54ccf98b8854fa5270e0b28106ad5cb (patch)
tree116b817b619791c3ac7710927a4ac0fab61ac027 /indra/newview/llpaneleditwearable.cpp
parent1ec883e456449ecf8d1d25ae3a78286748d46f6b (diff)
EXT-7206 FIXED Shape editing panel: implemented displaying avatar height in meters.
Changes: - Now displaying (continuously refreshed) avatar height in the shape editing panel. - Updated avatar avatar sex switching radio buttons according to the spec (icons, size, position). - Fixed position, text and font color of the "Shape:" label. Reviewed by Nyx at https://codereview.productengine.com/secondlife/r/367/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rw-r--r--indra/newview/llpaneleditwearable.cpp31
1 files changed, 30 insertions, 1 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 3c112b8b5e..5526e6b7be 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