aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatercustomize.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-10-12 00:55:19 -0700
committerMcCabe Maxsted2009-10-12 00:55:19 -0700
commitfafee316d45b0bc90a1790b9bbe75cd2724d7bf7 (patch)
tree03ff85c64d37151d91c47f792399336e2ff1c94c /linden/indra/newview/llfloatercustomize.cpp
parentRemoved reference to 'Second Life' from postcard message a la Meerkat (diff)
parentApplied avatar height in customize window from Emerald viewer (diff)
downloadmeta-impy-fafee316d45b0bc90a1790b9bbe75cd2724d7bf7.zip
meta-impy-fafee316d45b0bc90a1790b9bbe75cd2724d7bf7.tar.gz
meta-impy-fafee316d45b0bc90a1790b9bbe75cd2724d7bf7.tar.bz2
meta-impy-fafee316d45b0bc90a1790b9bbe75cd2724d7bf7.tar.xz
Merge branch '1.2.0-avheight' into 1.2.0-customize
Diffstat (limited to 'linden/indra/newview/llfloatercustomize.cpp')
-rw-r--r--linden/indra/newview/llfloatercustomize.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp
index b9deb6c..7d88a0f 100644
--- a/linden/indra/newview/llfloatercustomize.cpp
+++ b/linden/indra/newview/llfloatercustomize.cpp
@@ -1287,7 +1287,19 @@ void LLScrollingPanelParam::onSliderMoved(LLUICtrl* ctrl, void* userdata)
1287 F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() ); 1287 F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() );
1288 if (current_weight != new_weight ) 1288 if (current_weight != new_weight )
1289 { 1289 {
1290 gAgent.getAvatarObject()->setVisualParamWeight( param, new_weight, TRUE); 1290 LLFloaterCustomize* floater_customize = gFloaterCustomize;
1291 if (!floater_customize) return;
1292
1293 //KOWs avatar height stuff
1294 LLVOAvatar* avatar = gAgent.getAvatarObject();
1295 F32 avatar_size = (avatar->mBodySize.mV[VZ]) + (F32)0.17; //mBodySize is actually quite a bit off.
1296 avatar_size += (F32)99; //mBodySize is actually quite a bit off.
1297
1298 floater_customize->getChild<LLTextBox>("HeightText")->setValue(llformat("%.2f", avatar_size) + "m");
1299 floater_customize->getChild<LLTextBox>("HeightText2")->setValue(llformat("%.2f",llround(avatar_size / 0.3048)) + "'"
1300 + llformat("%.2f",llround(avatar_size * 39.37) % 12) + "\"");
1301
1302 gAgent.getAvatarObject()->setVisualParamWeight( param, new_weight, FALSE);
1291 gAgent.getAvatarObject()->updateVisualParams(); 1303 gAgent.getAvatarObject()->updateVisualParams();
1292 } 1304 }
1293} 1305}
@@ -2122,6 +2134,21 @@ void LLFloaterCustomize::draw()
2122 // arrives. Figure out some way to avoid this if possible. 2134 // arrives. Figure out some way to avoid this if possible.
2123 updateInventoryUI(); 2135 updateInventoryUI();
2124 2136
2137 LLFloaterCustomize* floater_customize = gFloaterCustomize;
2138 if (!floater_customize) return;
2139
2140 //KOWs avatar height stuff
2141 LLVOAvatar* avatar = gAgent.getAvatarObject();
2142 F32 avatar_size = (avatar->mBodySize.mV[VZ]) + (F32)0.17; //mBodySize is actually quite a bit off.
2143
2144 floater_customize->getChild<LLTextBox>("HeightText")->setValue(llformat("%.2f", avatar_size) + "m");
2145 //inches = avatar_size * 39.37
2146 //round(inches) + inches % 12
2147 std::string temp = llformat("%.0f",(F32)llfloor(avatar_size / 0.3048));
2148 std::string temp2 = llformat("%.0f",(F32)(llround(avatar_size * 39.37) % 12));
2149 floater_customize->getChild<LLTextBox>("HeightText2")->setValue(temp + "'"
2150 + temp2 + "\"");
2151
2125 LLScrollingPanelParam::sUpdateDelayFrames = 0; 2152 LLScrollingPanelParam::sUpdateDelayFrames = 0;
2126 2153
2127 childSetEnabled("Save All", isDirty() ); 2154 childSetEnabled("Save All", isDirty() );