diff options
author | McCabe Maxsted | 2009-10-12 00:55:19 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-10-12 00:55:19 -0700 |
commit | fafee316d45b0bc90a1790b9bbe75cd2724d7bf7 (patch) | |
tree | 03ff85c64d37151d91c47f792399336e2ff1c94c /linden | |
parent | Removed reference to 'Second Life' from postcard message a la Meerkat (diff) | |
parent | Applied avatar height in customize window from Emerald viewer (diff) | |
download | meta-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')
-rw-r--r-- | linden/indra/newview/llfloatercustomize.cpp | 29 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/floater_customize.xml | 18 |
2 files changed, 46 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() ); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml b/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml index e7a7a7b..e02607c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_customize.xml | |||
@@ -1057,6 +1057,24 @@ scratch and wear it. | |||
1057 | </tab_container> | 1057 | </tab_container> |
1058 | <scroll_container bottom="-476" follows="left|top|right|bottom" height="382" left="197" | 1058 | <scroll_container bottom="-476" follows="left|top|right|bottom" height="382" left="197" |
1059 | mouse_opaque="false" name="panel_container" opaque="false" width="292" /> | 1059 | mouse_opaque="false" name="panel_container" opaque="false" width="292" /> |
1060 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
1061 | bottom="-400" drop_shadow_visible="true" follows="left|top" | ||
1062 | font="SansSerif" h_pad="0" halign="left" height="16" | ||
1063 | left="8" mouse_opaque="true" name="AvatarHeightText" v_pad="0" width="140"> | ||
1064 | Avatar Height: | ||
1065 | </text> | ||
1066 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
1067 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" | ||
1068 | font="SansSerif" h_pad="0" halign="left" height="16" | ||
1069 | left="8" mouse_opaque="true" name="HeightText" v_pad="0" width="140"> | ||
1070 | Avatar Height | ||
1071 | </text> | ||
1072 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
1073 | bottom_delta="-18" drop_shadow_visible="true" follows="left|top" | ||
1074 | font="SansSerif" h_pad="0" halign="left" height="16" | ||
1075 | left="8" mouse_opaque="true" name="HeightText2" v_pad="0" width="140"> | ||
1076 | Avatar Height2 | ||
1077 | </text> | ||
1060 | <button bottom="-536" follows="right|bottom" font="SansSerif" halign="center" | 1078 | <button bottom="-536" follows="right|bottom" font="SansSerif" halign="center" |
1061 | height="20" label="Close" label_selected="Close" mouse_opaque="true" | 1079 | height="20" label="Close" label_selected="Close" mouse_opaque="true" |
1062 | name="Close" right="-10" scale_image="true" width="100" /> | 1080 | name="Close" right="-10" scale_image="true" width="100" /> |