summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpaneleditsky.cpp19
-rw-r--r--indra/newview/llpaneleditsky.h2
-rw-r--r--indra/newview/llpanelenvironment.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml130
4 files changed, 110 insertions, 45 deletions
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 73c92b0137..cb303b7ee2 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -65,8 +65,10 @@ namespace
const std::string FIELD_SKY_STAR_BRIGHTNESS("star_brightness");
const std::string FIELD_SKY_SUN_ROTATION("sun_rotation");
const std::string FIELD_SKY_SUN_IMAGE("sun_image");
+ const std::string FIELD_SKY_SUN_SCALE("sun_scale");
const std::string FIELD_SKY_MOON_ROTATION("moon_rotation");
const std::string FIELD_SKY_MOON_IMAGE("moon_image");
+ const std::string FIELD_SKY_MOON_SCALE("moon_scale");
const F32 SLIDER_SCALE_SUN_AMBIENT(3.0f);
const F32 SLIDER_SCALE_BLUE_HORIZON_DENSITY(2.0f);
@@ -334,6 +336,7 @@ 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<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunScaleChanged(); });
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);
@@ -344,7 +347,7 @@ BOOL LLPanelSettingsSkySunMoonTab::postBuild()
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);
-
+ getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onMoonScaleChanged(); });
refresh();
@@ -381,8 +384,10 @@ void LLPanelSettingsSkySunMoonTab::refresh()
getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setValue(mSkySettings->getStarBrightness());
getChild<LLVirtualTrackball>(FIELD_SKY_SUN_ROTATION)->setRotation(mSkySettings->getSunRotation());
getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setValue(mSkySettings->getSunTextureId());
+ getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->setValue(mSkySettings->getSunScale());
getChild<LLVirtualTrackball>(FIELD_SKY_MOON_ROTATION)->setRotation(mSkySettings->getMoonRotation());
getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->setValue(mSkySettings->getMoonTextureId());
+ getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->setValue(mSkySettings->getMoonScale());
}
//-------------------------------------------------------------------------
@@ -418,6 +423,12 @@ void LLPanelSettingsSkySunMoonTab::onSunRotationChanged()
mSkySettings->update();
}
+void LLPanelSettingsSkySunMoonTab::onSunScaleChanged()
+{
+ mSkySettings->setSunScale((getChild<LLUICtrl>(FIELD_SKY_SUN_SCALE)->getValue().asReal()));
+ mSkySettings->update();
+}
+
void LLPanelSettingsSkySunMoonTab::onSunImageChanged()
{
mSkySettings->setSunTextureId(getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->getValue().asUUID());
@@ -435,3 +446,9 @@ void LLPanelSettingsSkySunMoonTab::onMoonImageChanged()
mSkySettings->setMoonTextureId(getChild<LLTextureCtrl>(FIELD_SKY_MOON_IMAGE)->getValue().asUUID());
mSkySettings->update();
}
+
+void LLPanelSettingsSkySunMoonTab::onMoonScaleChanged()
+{
+ mSkySettings->setMoonScale((getChild<LLUICtrl>(FIELD_SKY_MOON_SCALE)->getValue().asReal()));
+ mSkySettings->update();
+}
diff --git a/indra/newview/llpaneleditsky.h b/indra/newview/llpaneleditsky.h
index 7c49c839ec..f0cfc0dab7 100644
--- a/indra/newview/llpaneleditsky.h
+++ b/indra/newview/llpaneleditsky.h
@@ -120,8 +120,10 @@ private:
void onGlowChanged();
void onStarBrightnessChanged();
void onSunRotationChanged();
+ void onSunScaleChanged();
void onSunImageChanged();
void onMoonRotationChanged();
+ void onMoonScaleChanged();
void onMoonImageChanged();
};
#endif // LLPANEL_EDIT_SKY_H
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 4425483989..d91f9110e0 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -243,8 +243,8 @@ void LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
getChild<LLUICtrl>(RDG_ENVIRONMENT_SELECT)->setEnabled(enabled);
getChild<LLUICtrl>(RDO_USEDEFAULT)->setEnabled(enabled && !is_legacy);
- getChild<LLUICtrl>(RDO_USEINV)->setEnabled(enabled && !is_legacy);
- getChild<LLUICtrl>(RDO_USECUSTOM)->setEnabled(enabled);
+ getChild<LLUICtrl>(RDO_USEINV)->setEnabled(false); // these two are selected automatically based on
+ getChild<LLUICtrl>(RDO_USECUSTOM)->setEnabled(false);
getChild<LLUICtrl>(EDT_INVNAME)->setEnabled(FALSE);
getChild<LLUICtrl>(BTN_SELECTINV)->setEnabled(enabled && !is_legacy);
getChild<LLUICtrl>(BTN_EDIT)->setEnabled(enabled);
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 2b79a1056f..586aff4bb8 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
@@ -32,39 +32,39 @@
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="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"
@@ -72,6 +72,29 @@
left_delta="-5"
top_delta="110"
width="80">
+ Scale:
+ </text>
+ <slider
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.25"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="0.25"
+ max_val="20"
+ name="sun_scale"
+ top_delta="15"
+ width="130"
+ can_edit_text="true"/>
+ <text
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-5"
+ top_delta="20"
+ width="80">
Color:
</text>
<color_swatch
@@ -89,7 +112,7 @@
height="10"
layout="topleft"
left_delta="-160"
- top_delta="47"
+ top_delta="27"
width="200">
Glow Focus:
</text>
@@ -135,7 +158,7 @@
height="10"
layout="topleft"
left_delta="-5"
- top_delta="30"
+ top_delta="22"
width="200">
Star Brightness:
</text>
@@ -195,13 +218,13 @@
Position:
</text>
<sun_moon_trackball
- name="moon_rotation"
- follows="left|top"
- left_delta="0"
- top_delta="20"
- height="150"
- width="150"
- thumb_mode="moon" />
+ name="moon_rotation"
+ follows="left|top"
+ left_delta="0"
+ top_delta="20"
+ height="150"
+ width="150"
+ thumb_mode="moon" />
<text
follows="left|top"
height="10"
@@ -218,6 +241,29 @@
name="moon_image"
top_pad="10"
width="100"/>
+ <text
+ follows="left|top"
+ height="10"
+ layout="topleft"
+ left_delta="-5"
+ top_delta="110"
+ width="80">
+ Scale:
+ </text>
+ <slider
+ decimal_digits="2"
+ follows="left|top"
+ height="16"
+ increment="0.25"
+ initial_value="0"
+ layout="topleft"
+ left_delta="5"
+ min_val="0.25"
+ max_val="20"
+ name="sun_scale"
+ top_delta="15"
+ width="130"
+ can_edit_text="true"/>
</layout_panel>
</layout_stack>
</layout_panel>