summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llenvironment.cpp1
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp7
-rw-r--r--indra/newview/llfloatereditextdaycycle.h2
-rw-r--r--indra/newview/llpaneleditsky.cpp19
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_ext_day_cycle.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml116
6 files changed, 83 insertions, 74 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index b2bd20d809..de3cb4982d 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -595,6 +595,7 @@ void LLEnvironment::onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLS
}
setEnvironment(env, settings);
+ updateEnvironment();
}
void LLEnvironment::clearEnvironment(LLEnvironment::EnvSelection_t env)
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 64773e4b59..165971b943 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()
@@ -203,7 +206,7 @@ void LLFloaterEditExtDayCycle::onOpen(const LLSD& key)
}
else
{
- loadLiveEnvironment(LLEnvironment::ENV_DEFAULT);
+ loadLiveEnvironment(env);
}
mDayLength.value(0);
@@ -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)
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 16cdc7994d..f84fdbb897 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -62,7 +62,7 @@ namespace
const std::string FIELD_SKY_CLOUD_DETAIL_Y("cloud_detail_y");
const std::string FIELD_SKY_CLOUD_DETAIL_D("cloud_detail_d");
- const std::string FIELD_SKY_SUN_MOON_COLOR("-m_moon_color");
+ const std::string FIELD_SKY_SUN_MOON_COLOR("sun_moon_color");
const std::string FIELD_SKY_GLOW_FOCUS("glow_focus");
const std::string FIELD_SKY_GLOW_SIZE("glow_size");
const std::string FIELD_SKY_STAR_BRIGHTNESS("star_brightness");
@@ -214,7 +214,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(); });
@@ -336,10 +338,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();
@@ -398,11 +407,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 c2eec2a56e..1ccd953b3b 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 &amp; 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