diff options
author | Rider Linden <rider@lindenlab.com> | 2018-08-09 16:36:44 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-08-09 16:36:44 -0700 |
commit | 7a001186b3063c36a78b2537b81c75124e307ff7 (patch) | |
tree | 823593baf8f7093bedd5bd1160bbdb3469c82e9c | |
parent | 3dfd3be98e19c239949eb7d59ef3fb84274322d1 (diff) |
Adjust layout of sunmoon panel and size of ext day edit. Blank sun texture. Fix edit and transition in edit day cycle. Fix default and blank images in sky textures.
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 7 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.h | 2 | ||||
-rw-r--r-- | indra/newview/llpaneleditsky.cpp | 17 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml | 12 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml | 116 |
7 files changed, 95 insertions, 77 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 4451bd753b..072dff4ce4 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1095,10 +1095,15 @@ LLUUID LLSettingsSky::GetDefaultAssetId() LLUUID LLSettingsSky::GetDefaultSunTextureId() { - //return DEFAULT_SUN_ID; return LLUUID::null; } + +LLUUID LLSettingsSky::GetBlankSunTextureId() +{ + return DEFAULT_SUN_ID; +} + LLUUID LLSettingsSky::GetDefaultMoonTextureId() { return DEFAULT_MOON_ID; diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 19a5656644..e2a6e6e8ae 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -235,6 +235,7 @@ public: static LLUUID GetDefaultAssetId(); static LLUUID GetDefaultSunTextureId(); + static LLUUID GetBlankSunTextureId(); static LLUUID GetDefaultMoonTextureId(); static LLUUID GetDefaultCloudNoiseTextureId(); static LLUUID GetDefaultBloomTextureId(); diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index dc882141db..85bcf086e5 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -140,6 +140,9 @@ LLFloaterEditExtDayCycle::LLFloaterEditExtDayCycle(const LLSD &key) : mScratchSky = LLSettingsVOSky::buildDefaultSky(); mScratchWater = LLSettingsVOWater::buildDefaultWater(); + + mEditSky = mScratchSky; + mEditWater = mScratchWater; } LLFloaterEditExtDayCycle::~LLFloaterEditExtDayCycle() @@ -558,7 +561,7 @@ void LLFloaterEditExtDayCycle::onFrameSliderCallback(const LLSD &data) mTimeSlider->setCurSliderValue(sliderpos); updateTabs(); - LLEnvironment::instance().updateEnvironment(); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); } void LLFloaterEditExtDayCycle::onFrameSliderDoubleClick(S32 x, S32 y, MASK mask) @@ -908,7 +911,7 @@ void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::pt mEditDay = std::dynamic_pointer_cast<LLSettingsDay>(settings); updateEditEnvironment(); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT); - LLEnvironment::instance().updateEnvironment(); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); synchronizeTabs(); updateTabs(); refresh(); @@ -935,7 +938,7 @@ void LLFloaterEditExtDayCycle::loadLiveEnvironment(LLEnvironment::EnvSelection_t updateEditEnvironment(); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_INSTANT); - LLEnvironment::instance().updateEnvironment(); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); synchronizeTabs(); updateTabs(); refresh(); @@ -960,7 +963,8 @@ void LLFloaterEditExtDayCycle::updateEditEnvironment(void) reblendSettings(); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, mScratchSky, mScratchWater); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, mEditSky, mEditWater); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); } void LLFloaterEditExtDayCycle::synchronizeTabs() @@ -993,6 +997,7 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() { psettingW = mScratchWater; } + mEditWater = psettingW; setTabsData(tabs, psettingW, canedit); @@ -1021,11 +1026,13 @@ void LLFloaterEditExtDayCycle::synchronizeTabs() { psettingS = mScratchSky; } + mEditSky = psettingS; doCloseInventoryFloater(); setTabsData(tabs, psettingS, canedit); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, psettingS, psettingW); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_EDIT, mEditSky, mEditWater); + LLEnvironment::instance().updateEnvironment(LLEnvironment::TRANSITION_INSTANT); } void LLFloaterEditExtDayCycle::setTabsData(LLTabContainer * tabcontainer, const LLSettingsBase::ptr_t &settings, bool editable) diff --git a/indra/newview/llfloatereditextdaycycle.h b/indra/newview/llfloatereditextdaycycle.h index 0607d35d4a..83506ba85f 100644 --- a/indra/newview/llfloatereditextdaycycle.h +++ b/indra/newview/llfloatereditextdaycycle.h @@ -172,6 +172,8 @@ private: LLSettingsSky::ptr_t mScratchSky; LLSettingsWater::ptr_t mScratchWater; LLSettingsBase::ptr_t mCurrentEdit; + LLSettingsSky::ptr_t mEditSky; + LLSettingsWater::ptr_t mEditWater; LLFrameTimer mPlayTimer; F32 mPlayStartFrame; // an env frame diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 87c0a21c42..73c92b0137 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -210,7 +210,9 @@ BOOL LLPanelSettingsSkyCloudTab::postBuild() getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScaleChanged(); }); getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudScrollChanged(); }); getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudMapChanged(); }); -// getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::DEFAULT_CLOUD_TEXTURE_ID); + getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setDefaultImageAssetID(LLSettingsSky::GetDefaultCloudNoiseTextureId()); + getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE); + getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowLocalTexture(FALSE); getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onCloudDensityChanged(); }); @@ -332,10 +334,17 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild() getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onStarBrightnessChanged(); }); getChild<LLUICtrl>(FIELD_SKY_SUN_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunRotationChanged(); }); getChild<LLUICtrl>(FIELD_SKY_SUN_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunImageChanged(); }); -// getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky:: ); + getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId()); + getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetBlankSunTextureId()); + getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowNoTexture(TRUE); + getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setAllowLocalTexture(FALSE); getChild<LLUICtrl>(FIELD_SKY_MOON_ROTATION)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonRotationChanged(); }); getChild<LLUICtrl>(FIELD_SKY_MOON_IMAGE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonImageChanged(); }); -// getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky:: ); + getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setDefaultImageAssetID(LLSettingsSky::GetDefaultMoonTextureId()); + getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setBlankImageAssetID(LLSettingsSky::GetBlankSunTextureId()); + getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowNoTexture(TRUE); + getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setAllowLocalTexture(FALSE); + refresh(); @@ -394,11 +403,13 @@ void LLPanelSettingsSkySunMoonTab::onGlowChanged() glow.mV[2] *= SLIDER_SCALE_GLOW_B; mSkySettings->setGlow(glow); + mSkySettings->update(); } void LLPanelSettingsSkySunMoonTab::onStarBrightnessChanged() { mSkySettings->setStarBrightness(getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->getValue().asReal()); + mSkySettings->update(); } void LLPanelSettingsSkySunMoonTab::onSunRotationChanged() diff --git a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml index 5e38a289c9..e3cd72c39d 100644 --- a/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml +++ b/indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml @@ -7,8 +7,8 @@ title="Edit Day Cycle" width="705" height="650" - min_width="450" - min_height="85" + min_width="705" + min_height="650" can_resize="true"> <!-- obsolete?, add as hint for 'save' button? --> @@ -455,14 +455,14 @@ <layout_panel name="frame_settings_water" auto_resize="true" user_resize="true" - height="500" + height="420" width="700" min_height="0" - visible="true"> + visible="false"> <tab_container follows="all" halign="left" - height="430" + height="420" layout="topleft" left="0" name="water_tabs" @@ -488,7 +488,7 @@ height="420" width="700" min_height="0" - visible="false"> + visible="true"> <tab_container follows="all" halign="left" diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml index 15d20e46b7..2b79a1056f 100644 --- a/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml +++ b/indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml @@ -28,8 +28,51 @@ layout="topleft" left_delta="15" top_pad="15" + font="SansSerifBold" + width="120"> + Sun & Stars + </text> + <text + follows="left|top" + height="10" + layout="topleft" + left_delta="10" + top_delta="30" + width="100"> + Position: + </text> + <sun_moon_trackball + name="sun_rotation" + follows="left|top" + left_delta="0" + top_delta="20" + height="150" + width="150" + thumb_mode="sun" /> + <text + follows="left|top" + height="10" + layout="topleft" + left_delta="160" + top_delta="-20" + width="200"> + Image: + </text> + <texture_picker + height="123" + layout="topleft" + left_delta="5" + name="sun_image" + top_pad="10" + width="100"/> + <text + follows="left|top" + height="10" + layout="topleft" + left_delta="-5" + top_delta="110" width="80"> - Sun Color: + Color: </text> <color_swatch can_apply_immediately="true" @@ -37,7 +80,7 @@ height="37" label_height="0" layout="topleft" - left_delta="0" + left_delta="5" name="sun_moon_color" top_pad="5" width="60" /> @@ -45,8 +88,8 @@ follows="left|top" height="10" layout="topleft" - left_delta="0" - top_delta="57" + left_delta="-160" + top_delta="47" width="200"> Glow Focus: </text> @@ -61,15 +104,15 @@ min_val="0" max_val="0.5" name="glow_focus" - top_delta="20" - width="200" + top_delta="15" + width="250" can_edit_text="true"/> <text follows="left|top" height="10" layout="topleft" left_delta="-5" - top_delta="20" + top_delta="22" width="200"> Glow Size: </text> @@ -84,8 +127,8 @@ min_val="1" max_val="1.99" name="glow_size" - top_delta="20" - width="200" + top_delta="15" + width="250" can_edit_text="true"/> <text follows="left|top" @@ -107,8 +150,8 @@ min_val="0" max_val="2" name="star_brightness" - top_delta="20" - width="200" + top_delta="15" + width="250" can_edit_text="true"/> </layout_panel> <layout_panel @@ -140,57 +183,6 @@ top_pad="15" font="SansSerifBold" width="80"> - Sun - </text> - <text - follows="left|top" - height="10" - layout="topleft" - left_delta="10" - top_delta="30" - width="100"> - Position: - </text> - <sun_moon_trackball - name="sun_rotation" - follows="left|top" - left_delta="0" - top_delta="20" - height="150" - width="150" - thumb_mode="sun" /> - <text - follows="left|top" - height="10" - layout="topleft" - left_delta="160" - top_delta="-20" - width="200"> - Image: - </text> - <texture_picker - height="123" - layout="topleft" - left_delta="5" - name="sun_image" - top_pad="10" - width="100"/> - </layout_panel> - <layout_panel - border="true" - bevel_style="in" - auto_resize="true" - user_resize="true" - visible="true" - height="220"> - <text - follows="left|top" - height="10" - layout="topleft" - left_delta="15" - top_pad="15" - font="SansSerifBold" - width="80"> Moon </text> <text |