summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/indra_constants.cpp1
-rw-r--r--indra/llcommon/indra_constants.h1
-rw-r--r--indra/llinventory/llsettingssky.cpp36
-rw-r--r--indra/llinventory/llsettingswater.cpp14
-rw-r--r--indra/newview/llenvironment.cpp2
-rw-r--r--indra/newview/llfloaterland.cpp1
-rw-r--r--indra/newview/llpaneleditsky.cpp6
-rw-r--r--indra/newview/llpanelenvironment.cpp128
-rw-r--r--indra/newview/llpanelenvironment.h2
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_environment.xml6
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml12
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml14
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_sky_sunmoon.xml8
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_water.xml24
14 files changed, 151 insertions, 104 deletions
diff --git a/indra/llcommon/indra_constants.cpp b/indra/llcommon/indra_constants.cpp
index 7ea42a3fc0..601eb45570 100644
--- a/indra/llcommon/indra_constants.cpp
+++ b/indra/llcommon/indra_constants.cpp
@@ -64,7 +64,6 @@ const LLUUID IMG_ALPHA_GRAD ("e97cf410-8e61-7005-ec06-629eba4cd1fb"); // VIEW
const LLUUID IMG_ALPHA_GRAD_2D ("38b86f85-2575-52a9-a531-23108d8da837"); // VIEWER
const LLUUID IMG_TRANSPARENT ("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903"); // VIEWER
-const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER
const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER
const LLUUID TERRAIN_GRASS_DETAIL ("63338ede-0037-c4fd-855b-015d77112fc8"); // VIEWER
const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); // VIEWER
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index a00a82aff0..010a190181 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -201,7 +201,6 @@ LL_COMMON_API extern const LLUUID IMG_ALPHA_GRAD;
LL_COMMON_API extern const LLUUID IMG_ALPHA_GRAD_2D;
LL_COMMON_API extern const LLUUID IMG_TRANSPARENT;
-LL_COMMON_API extern const LLUUID IMG_BLOOM1;
LL_COMMON_API extern const LLUUID TERRAIN_DIRT_DETAIL;
LL_COMMON_API extern const LLUUID TERRAIN_GRASS_DETAIL;
LL_COMMON_API extern const LLUUID TERRAIN_MOUNTAIN_DETAIL;
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 399692d80b..4543f00454 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -33,8 +33,11 @@
#include "v3colorutil.h"
//=========================================================================
-static const F32 NIGHTTIME_ELEVATION = -8.0f; // degrees
-static const F32 NIGHTTIME_ELEVATION_SIN = (F32)sinf(NIGHTTIME_ELEVATION * DEG_TO_RAD);
+namespace {
+ const F32 NIGHTTIME_ELEVATION = -8.0f; // degrees
+ const F32 NIGHTTIME_ELEVATION_SIN = (F32)sinf(NIGHTTIME_ELEVATION * DEG_TO_RAD);
+ const LLUUID IMG_BLOOM1("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef");
+}
namespace {
LLQuaternion convert_azimuth_and_altitude_to_quat(F32 azimuth, F32 altitude)
@@ -480,17 +483,17 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
LLSD(LLSDArray(2.0f)(2.0f)(2.0f)("*")))));
validation.push_back(Validator(SETTING_HAZE_DENSITY, false, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(4.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
validation.push_back(Validator(SETTING_HAZE_HORIZON, false, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(5.0f)))));
validation.push_back(Validator(SETTING_AMBIENT, false, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
LLSD(LLSDArray(3.0f)(3.0f)(3.0f)("*")))));
validation.push_back(Validator(SETTING_DENSITY_MULTIPLIER, false, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(0.0009f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(2.0f)))));
validation.push_back(Validator(SETTING_DISTANCE_MULTIPLIER, false, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(100.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1000.0f)))));
validation.push_back(Validator(SETTING_BLOOM_TEXTUREID, true, LLSD::TypeUUID));
@@ -501,17 +504,17 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
validation.push_back(Validator(SETTING_CLOUD_POS_DENSITY1, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
- LLSD(LLSDArray(1.68841f)(1.0f)(1.0f)("*")))));
+ LLSD(LLSDArray(1.0f)(1.0f)(3.0f)("*")))));
validation.push_back(Validator(SETTING_CLOUD_POS_DENSITY2, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)("*")),
- LLSD(LLSDArray(1.68841f)(1.0f)(1.0f)("*")))));
+ LLSD(LLSDArray(1.0f)(1.0f)(1.0f)("*")))));
validation.push_back(Validator(SETTING_CLOUD_SCALE, true, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.001f)(0.999f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.001f)(3.0f)))));
validation.push_back(Validator(SETTING_CLOUD_SCROLL_RATE, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
- LLSD(LLSDArray(0.0f)(0.0f)),
- LLSD(LLSDArray(20.0f)(20.0f)))));
+ LLSD(LLSDArray(-50.0f)(-50.0f)),
+ LLSD(LLSDArray(50.0f)(50.0f)))));
validation.push_back(Validator(SETTING_CLOUD_SHADOW, true, LLSD::TypeReal,
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
validation.push_back(Validator(SETTING_CLOUD_TEXTUREID, false, LLSD::TypeUUID));
@@ -521,14 +524,14 @@ LLSettingsSky::validation_list_t LLSettingsSky::validationList()
validation.push_back(Validator(SETTING_DOME_RADIUS, false, LLSD::TypeReal,
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(1000.0f)(2000.0f)))));
validation.push_back(Validator(SETTING_GAMMA, true, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(10.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(20.0f)))));
validation.push_back(Validator(SETTING_GLOW, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
- LLSD(LLSDArray(0.2f)("*")(-2.5f)("*")),
- LLSD(LLSDArray(20.0f)("*")(0.0f)("*")))));
+ LLSD(LLSDArray(0.2f)("*")(-10.0f)("*")),
+ LLSD(LLSDArray(40.0f)("*")(10.0f)("*")))));
validation.push_back(Validator(SETTING_MAX_Y, true, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(4000.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(10000.0f)))));
validation.push_back(Validator(SETTING_MOON_ROTATION, true, LLSD::TypeArray, &Validator::verifyQuaternionNormal));
validation.push_back(Validator(SETTING_MOON_SCALE, false, LLSD::TypeReal,
boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.25f)(20.0f))), LLSD::Real(1.0)));
@@ -645,7 +648,7 @@ LLSD LLSettingsSky::defaults(const LLSettingsBase::TrackPosition& position)
dfltsetting[SETTING_CLOUD_POS_DENSITY1] = LLColor4(1.0000, 0.5260, 1.0000, 0.0).getValue();
dfltsetting[SETTING_CLOUD_POS_DENSITY2] = LLColor4(1.0000, 0.5260, 1.0000, 0.0).getValue();
dfltsetting[SETTING_CLOUD_SCALE] = LLSD::Real(0.4199);
- dfltsetting[SETTING_CLOUD_SCROLL_RATE] = LLSDArray(10.1999)(10.0109);
+ dfltsetting[SETTING_CLOUD_SCROLL_RATE] = LLSDArray(0.0f)(0.0f);
dfltsetting[SETTING_CLOUD_SHADOW] = LLSD::Real(0.2699);
dfltsetting[SETTING_DOME_OFFSET] = LLSD::Real(0.96f);
@@ -752,6 +755,7 @@ LLSD LLSettingsSky::translateLegacySettings(const LLSD& legacy)
{
LLVector2 cloud_scroll(legacy[SETTING_CLOUD_SCROLL_RATE]);
+ cloud_scroll -= LLVector2(10, 10);
if (legacy.has(SETTING_LEGACY_ENABLE_CLOUD_SCROLL))
{
LLSD enabled = legacy[SETTING_LEGACY_ENABLE_CLOUD_SCROLL];
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index 652e211ac4..33f824028b 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -213,7 +213,7 @@ LLSettingsWater::validation_list_t LLSettingsWater::validationList()
// in deeply nested arrays like this [[[[[[[[[[v1,v2,v3]]]]]]]]]]
validation.push_back(Validator(SETTING_BLUR_MULTIPILER, true, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(0.16f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(-0.5f)(0.5f)))));
validation.push_back(Validator(SETTING_FOG_COLOR, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)(1.0f)),
@@ -232,17 +232,17 @@ LLSettingsWater::validation_list_t LLSettingsWater::validationList()
LLSD(LLSDArray(0.0f)(0.0f)(0.0f)),
LLSD(LLSDArray(10.0f)(10.0f)(10.0f)))));
validation.push_back(Validator(SETTING_SCALE_ABOVE, true, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(3.0f)))));
validation.push_back(Validator(SETTING_SCALE_BELOW, true, LLSD::TypeReal,
- boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(1.0f)))));
+ boost::bind(&Validator::verifyFloatRange, _1, LLSD(LLSDArray(0.0f)(3.0f)))));
validation.push_back(Validator(SETTING_WAVE1_DIR, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
- LLSD(LLSDArray(-4.0f)(-4.0f)),
- LLSD(LLSDArray(4.0f)(4.0f)))));
+ LLSD(LLSDArray(-20.0f)(-20.0f)),
+ LLSD(LLSDArray(20.0f)(20.0f)))));
validation.push_back(Validator(SETTING_WAVE2_DIR, true, LLSD::TypeArray,
boost::bind(&Validator::verifyVectorMinMax, _1,
- LLSD(LLSDArray(-4.0f)(-4.0f)),
- LLSD(LLSDArray(4.0f)(4.0f)))));
+ LLSD(LLSDArray(-20.0f)(-20.0f)),
+ LLSD(LLSDArray(20.0f)(20.0f)))));
}
return validation;
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 1b38fceef7..5abb1b2e55 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -880,7 +880,7 @@ void LLEnvironment::updateCloudScroll()
if (mCurrentEnvironment->getSky() && !mCloudScrollPaused)
{
- LLVector2 cloud_delta = static_cast<F32>(delta_t)* (mCurrentEnvironment->getSky()->getCloudScrollRate() - LLVector2(10.0, 10.0)) / 100.0;
+ LLVector2 cloud_delta = static_cast<F32>(delta_t)* (mCurrentEnvironment->getSky()->getCloudScrollRate()) / 100.0;
mCloudScrollDelta += cloud_delta;
}
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 3d3f5e8cfa..1147f54853 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -3297,7 +3297,6 @@ void LLPanelLandEnvironment::refresh()
}
LLPanelEnvironmentInfo::refresh();
- getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(FALSE);
}
void LLPanelLandEnvironment::refreshFromSource()
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp
index 1b41529795..0d36fce90a 100644
--- a/indra/newview/llpaneleditsky.cpp
+++ b/indra/newview/llpaneleditsky.cpp
@@ -96,8 +96,6 @@ namespace
const F32 SLIDER_SCALE_BLUE_HORIZON_DENSITY(2.0f);
const F32 SLIDER_SCALE_GLOW_R(20.0f);
const F32 SLIDER_SCALE_GLOW_B(-5.0f);
-
- const LLVector2 CLOUD_SCROLL_ADJUST(10, 10);
}
static LLPanelInjector<LLPanelSettingsSkyAtmosTab> t_settings_atmos("panel_settings_atmos");
@@ -300,7 +298,6 @@ void LLPanelSettingsSkyCloudTab::refresh()
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCALE)->setValue(mSkySettings->getCloudScale());
LLVector2 cloudScroll(mSkySettings->getCloudScrollRate());
- cloudScroll -= CLOUD_SCROLL_ADJUST;
getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->setValue(cloudScroll.getValue());
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setValue(mSkySettings->getCloudNoiseTextureId());
@@ -340,7 +337,6 @@ void LLPanelSettingsSkyCloudTab::onCloudScaleChanged()
void LLPanelSettingsSkyCloudTab::onCloudScrollChanged()
{
LLVector2 scroll(getChild<LLUICtrl>(FIELD_SKY_CLOUD_SCROLL_XY)->getValue());
- scroll += CLOUD_SCROLL_ADJUST;
mSkySettings->setCloudScrollRate(scroll);
setIsDirty();
}
@@ -356,7 +352,7 @@ void LLPanelSettingsSkyCloudTab::onCloudDensityChanged()
LLColor3 density(getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_X)->getValue().asReal(),
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_Y)->getValue().asReal(),
getChild<LLUICtrl>(FIELD_SKY_CLOUD_DENSITY_D)->getValue().asReal());
-
+
mSkySettings->setCloudPosDensity1(density);
setIsDirty();
}
diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp
index 1beba9db0c..aa8c6cf724 100644
--- a/indra/newview/llpanelenvironment.cpp
+++ b/indra/newview/llpanelenvironment.cpp
@@ -65,6 +65,7 @@ const std::string LLPanelEnvironmentInfo::BTN_EDIT("btn_edit");
const std::string LLPanelEnvironmentInfo::SLD_DAYLENGTH("sld_day_length");
const std::string LLPanelEnvironmentInfo::SLD_DAYOFFSET("sld_day_offset");
const std::string LLPanelEnvironmentInfo::SLD_ALTITUDES("sld_altitudes");
+const std::string LLPanelEnvironmentInfo::ICN_GROUND("icon_ground");
const std::string LLPanelEnvironmentInfo::CHK_ALLOWOVERRIDE("chk_allow_override");
const std::string LLPanelEnvironmentInfo::BTN_APPLY("btn_apply");
const std::string LLPanelEnvironmentInfo::BTN_CANCEL("btn_cancel");
@@ -94,12 +95,8 @@ const U32 LLPanelEnvironmentInfo::DIRTY_FLAG_MASK(
LLPanelEnvironmentInfo::DIRTY_FLAG_DAYOFFSET |
LLPanelEnvironmentInfo::DIRTY_FLAG_ALTITUDES);
-#if 0
-// Because the OSX is Very cranky when I don't use a variable.
const U32 ALTITUDE_SLIDER_COUNT = 3;
-#endif
-
const std::string alt_sliders[] = {
"sld1",
"sld2",
@@ -249,6 +246,7 @@ void LLPanelEnvironmentInfo::refresh()
updateAltLabel(alt_labels[idx], idx + 2, altitudes[idx+1]);
mAltitudes[alt_sliders[idx]] = AltitudeData(idx+1, idx, altitudes[idx+1]);
}
+ readjustAltLabels();
}
#endif
@@ -363,6 +361,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
getChild<LLUICtrl>(PNL_SETTINGS)->setVisible(false);
getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(false);
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(true);
+ getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(FALSE);
updateEditFloater(mCurrentEnvironment);
@@ -372,6 +371,13 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
getChild<LLUICtrl>(PNL_BUTTONS)->setVisible(true);
getChild<LLUICtrl>(PNL_DISABLED)->setVisible(false);
+#if 1
+ // hiding the controls until Rider can get the simulator code to adjust altitudes done.
+ getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(FALSE);
+#else
+ getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setVisible(isRegion());
+#endif
+
S32 rdo_selection = getChild<LLRadioGroup>(RDG_ENVIRONMENT_SELECT)->getSelectedIndex();
getChild<LLUICtrl>(RDG_ENVIRONMENT_SELECT)->setEnabled(enabled);
@@ -383,6 +389,7 @@ bool LLPanelEnvironmentInfo::setControlsEnabled(bool enabled)
getChild<LLUICtrl>(BTN_EDIT)->setEnabled(enabled);
getChild<LLUICtrl>(SLD_DAYLENGTH)->setEnabled(enabled && (rdo_selection != 0) && !is_legacy);
getChild<LLUICtrl>(SLD_DAYOFFSET)->setEnabled(enabled && (rdo_selection != 0) && !is_legacy);
+ getChild<LLUICtrl>(PNL_ENVIRONMENT_ALTITUDES)->setEnabled(enabled && isRegion() && !is_legacy);
getChild<LLUICtrl>(CHK_ALLOWOVERRIDE)->setEnabled(enabled && isRegion() && !is_legacy);
getChild<LLUICtrl>(BTN_APPLY)->setEnabled(enabled && (mDirtyFlag != 0));
getChild<LLUICtrl>(BTN_CANCEL)->setEnabled(enabled && (mDirtyFlag != 0));
@@ -426,10 +433,10 @@ void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_name, U32 sky
{
LLMultiSliderCtrl *sld = getChild<LLMultiSliderCtrl>(SLD_ALTITUDES);
LLRect sld_rect = sld->getRect();
- U32 sld_range = sld_rect.getHeight();
- U32 sld_bottom = sld_rect.mBottom;
- U32 sld_offset = sld_rect.getWidth(); // Roughly identical to thumb's width in slider.
- U32 pos = (sld_range - sld_offset) * ((alt_value - 100) / (4000 - 100));
+ S32 sld_range = sld_rect.getHeight();
+ S32 sld_bottom = sld_rect.mBottom;
+ S32 sld_offset = sld_rect.getWidth(); // Roughly identical to thumb's width in slider.
+ S32 pos = (sld_range - sld_offset) * ((alt_value - 100) / (4000 - 100));
// get related text box
LLTextBox* text = getChild<LLTextBox>(alt_name);
@@ -437,7 +444,7 @@ void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_name, U32 sky
{
// move related text box
LLRect rect = text->getRect();
- U32 height = rect.getHeight();
+ S32 height = rect.getHeight();
rect.mBottom = sld_bottom + (sld_offset / 2 + 1) + pos - (height / 2);
rect.mTop = rect.mBottom + height;
text->setRect(rect);
@@ -453,6 +460,59 @@ void LLPanelEnvironmentInfo::updateAltLabel(const std::string &alt_name, U32 sky
}
}
+void LLPanelEnvironmentInfo::readjustAltLabels()
+{
+ // Restore ground label position
+ LLView* icon = getChild<LLView>(ICN_GROUND);
+ LLTextBox* text = getChild<LLTextBox>(alt_labels[ALTITUDE_SLIDER_COUNT]); // one more field then sliders
+ LLRect ground_text_rect = text->getRect();
+ LLRect icon_rect = icon->getRect();
+ S32 height = ground_text_rect.getHeight();
+ ground_text_rect.mBottom = icon_rect.mBottom + (icon_rect.getHeight()/2) - (height/2);
+ ground_text_rect.mTop = ground_text_rect.mBottom + height;
+ text->setRect(ground_text_rect);
+
+ // Re-adjust all labels
+ // Very simple "adjust after the fact" method
+ // Note: labels are unordered, labels are 1 above sliders due to 'ground'
+
+ for (U32 i = 0; i < ALTITUDE_SLIDER_COUNT; i++)
+ {
+ LLTextBox* text_cmp = getChild<LLTextBox>(alt_labels[i]);
+
+ for (U32 j = i + 1; j <= ALTITUDE_SLIDER_COUNT; j++)
+ {
+ LLTextBox* text_intr = getChild<LLTextBox>(alt_labels[j]);
+ if (text_cmp && text_intr)
+ {
+ LLRect cmp_rect = text_cmp->getRect();
+ LLRect intr_rect = text_intr->getRect();
+ S32 shift = 0;
+ if (cmp_rect.mBottom <= intr_rect.mTop && cmp_rect.mBottom >= intr_rect.mBottom)
+ {
+ // Aproximate shift
+ // We probably will need more cycle runs over all labels to get accurate one
+ // At the moment single cycle should do since we have too little elements to do something complicated
+ shift = (cmp_rect.mBottom - intr_rect.mTop) / 2;
+ }
+ else if (cmp_rect.mTop >= intr_rect.mBottom && cmp_rect.mTop <= intr_rect.mTop)
+ {
+ // Aproximate shift
+ shift = (cmp_rect.mTop - intr_rect.mBottom) / 2;
+ }
+ if (shift != 0)
+ {
+ cmp_rect.translate(0, -shift);
+ text_cmp->setRect(cmp_rect);
+
+ intr_rect.translate(0, shift);
+ text_intr->setRect(intr_rect);
+ }
+ }
+ }
+ }
+}
+
void LLPanelEnvironmentInfo::onSwitchDefaultSelection()
{
bool can_edit = canEdit();
@@ -491,51 +551,33 @@ void LLPanelEnvironmentInfo::onAltSliderCallback(LLUICtrl *cntrl, const LLSD &da
LLMultiSliderCtrl *sld = (LLMultiSliderCtrl *)cntrl;
std::string sld_name = sld->getCurSlider();
F32 sld_value = sld->getCurSliderValue();
- U32 alt_index = 1;
mAltitudes[sld_name].mAltitude = sld_value;
- // find index of sky layer/altitude
- altitudes_data_t::iterator iter = mAltitudes.begin();
+ // update all labels since we could have jumped multiple and we will need to readjust
+ // (or sort by altitude, too little elements, so I didn't bother with efficiency)
altitudes_data_t::iterator end = mAltitudes.end();
- while (iter!=end)
- {
- if (sld_value > iter->second.mAltitude)
- {
- alt_index++;
- }
- iter++;
- }
-
- if (mAltitudes[sld_name].mAltitudeIndex != alt_index)
+ altitudes_data_t::iterator iter = mAltitudes.begin();
+ altitudes_data_t::iterator iter2;
+ U32 new_index;
+ while (iter != end)
{
- // update all labels since we could have jumped multiple
- // (or sort by altitude, too little elements, so I didn't bother with efficiency)
- altitudes_data_t::iterator iter = mAltitudes.begin();
- altitudes_data_t::iterator iter2;
- U32 new_index;
- while (iter != end)
+ iter2 = mAltitudes.begin();
+ new_index = 1;
+ while (iter2 != end)
{
- iter2 = mAltitudes.begin();
- new_index = 1;
- while (iter2 != end)
+ if (iter->second.mAltitude > iter2->second.mAltitude)
{
- if (iter->second.mAltitude > iter2->second.mAltitude)
- {
- new_index++;
- }
- iter2++;
+ new_index++;
}
- iter->second.mAltitudeIndex = new_index;
- updateAltLabel(alt_labels[iter->second.mLabelIndex], iter->second.mAltitudeIndex + 1, iter->second.mAltitude);
- iter++;
+ iter2++;
}
- }
- else
- {
- updateAltLabel(alt_labels[mAltitudes[sld_name].mLabelIndex], alt_index + 1, sld_value);
+ iter->second.mAltitudeIndex = new_index;
+ updateAltLabel(alt_labels[iter->second.mLabelIndex], iter->second.mAltitudeIndex + 1, iter->second.mAltitude);
+ iter++;
}
+ readjustAltLabels();
setDirtyFlag(DIRTY_FLAG_ALTITUDES);
}
diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h
index 2753e766ac..93fe186d6f 100644
--- a/indra/newview/llpanelenvironment.h
+++ b/indra/newview/llpanelenvironment.h
@@ -71,6 +71,7 @@ protected:
static const std::string SLD_DAYLENGTH;
static const std::string SLD_DAYOFFSET;
static const std::string SLD_ALTITUDES;
+ static const std::string ICN_GROUND;
static const std::string CHK_ALLOWOVERRIDE;
static const std::string BTN_APPLY;
static const std::string BTN_CANCEL;
@@ -104,6 +105,7 @@ protected:
bool getIsDirtyFlag(U32 flag) const { return ((mDirtyFlag & flag) != 0); }
U32 getDirtyFlag() const { return mDirtyFlag; }
void updateAltLabel(const std::string &alt_name, U32 sky_index, F32 alt_value);
+ void readjustAltLabels();
void onSwitchDefaultSelection();
void onSldDayLengthChanged(F32 value);
diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml
index 539d5a636b..cfbe25129b 100644
--- a/indra/newview/skins/default/xui/en/panel_region_environment.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml
@@ -161,7 +161,7 @@
top_pad="6"
name="sld_day_length"
min_val="4"
- max_val="178"
+ max_val="168"
width="180" />
<text
type="string"
@@ -244,7 +244,7 @@
width="17"
orientation="vertical"
increment="10"
- initial_value="100"
+ min_val="100"
max_val="4000"
layout="topleft"
left="15"
@@ -277,7 +277,7 @@
height="12"
layout="topleft"
left_pad="3"
- top_delta="0"
+ top_delta="2"
width="200"
name="ground">
Ground
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
index fd66df0f74..8ef96009d4 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_atmos.xml
@@ -119,7 +119,7 @@
layout="topleft"
left_delta="5"
min_val="0"
- max_val="1"
+ max_val="5"
name="haze_horizon"
top_delta="20"
width="207"
@@ -142,7 +142,7 @@
layout="topleft"
left_delta="5"
min_val="0"
- max_val="1"
+ max_val="5"
name="haze_density"
top_delta="20"
width="207"
@@ -164,7 +164,7 @@
initial_value="0"
layout="topleft"
left_delta="5"
- max_val="10"
+ max_val="20"
name="scene_gamma"
top_delta="20"
width="214"
@@ -195,7 +195,7 @@
layout="topleft"
left_delta="5"
min_val="0.0001"
- max_val="0.9"
+ max_val="2"
name="density_multip"
top_delta="20"
width="207"
@@ -218,7 +218,7 @@
layout="topleft"
left_delta="5"
min_val="0"
- max_val="100"
+ max_val="1000"
name="distance_multip"
top_delta="20"
width="219"
@@ -241,7 +241,7 @@
layout="topleft"
left_delta="5"
min_val="0"
- max_val="4000"
+ max_val="10000"
name="max_alt"
top_delta="20"
width="219"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
index 412ed8bf82..568345e01f 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_sky_clouds.xml
@@ -83,7 +83,7 @@
layout="topleft"
left_delta="5"
min_val="0"
- max_val="1"
+ max_val="3"
name="cloud_scale"
top_delta="20"
width="214"
@@ -105,10 +105,10 @@
visible="true"
left_delta="0"
top_delta="21"
- min_val_x="-10"
- max_val_x="10"
- min_val_y="-10"
- max_val_y="10" />
+ min_val_x="-30"
+ max_val_x="30"
+ min_val_y="-30"
+ max_val_y="30" />
<text
follows="left|top"
@@ -183,7 +183,7 @@
layout="topleft"
left_delta="0"
min_val="0"
- max_val="1"
+ max_val="3"
name="cloud_density_d"
top_delta="20"
width="200"
@@ -237,7 +237,7 @@
layout="topleft"
left_delta="0"
min_val="0"
- max_val="1"
+ max_val="2"
name="cloud_detail_d"
top_delta="20"
width="200"
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 841a8c3199..bc267bb7b9 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
@@ -124,8 +124,8 @@
initial_value="0"
layout="topleft"
left_delta="5"
- min_val="0"
- max_val="0.5"
+ min_val="-2"
+ max_val="2"
name="glow_focus"
top_delta="15"
width="250"
@@ -147,8 +147,8 @@
initial_value="0"
layout="topleft"
left_delta="5"
- min_val="1"
- max_val="1.99"
+ min_val="0"
+ max_val="2"
name="glow_size"
top_delta="15"
width="250"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_water.xml b/indra/newview/skins/default/xui/en/panel_settings_water.xml
index 4c9ae57941..d88195bf48 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_water.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_water.xml
@@ -68,6 +68,7 @@
initial_value="0"
layout="top"
left_delta="15"
+ min_val="-10"
max_val="10"
name="water_fog_density"
top_delta="5"
@@ -190,11 +191,11 @@
visible="true"
left_delta="0"
top_delta="21"
- min_val_x="-4"
- max_val_x="4"
+ min_val_x="-20"
+ max_val_x="20"
increment_x="0.5f"
- min_val_y="-4"
- max_val_y="4"
+ min_val_y="-20"
+ max_val_y="20"
increment_y="0.5f"
arrow_color="white"/>
@@ -214,10 +215,10 @@
visible="true"
left_delta="0"
top_delta="21"
- min_val_x="-4"
- max_val_x="4"
- min_val_y="-4"
- max_val_y="4"
+ min_val_x="-20"
+ max_val_x="20"
+ min_val_y="-20"
+ max_val_y="20"
arrow_color="white"/>
<text
@@ -306,6 +307,8 @@
height="16"
layout="topleft"
left_delta="5"
+ min_val="0"
+ max_val="3"
name="water_scale_above"
top_pad="5"
width="200"
@@ -330,6 +333,8 @@
initial_value="0"
layout="topleft"
left_delta="5"
+ min_val="0"
+ max_val="3"
name="water_scale_below"
top_pad="5"
width="200"
@@ -352,7 +357,8 @@
initial_value="0"
layout="topleft"
left_delta="5"
- max_val="0.16"
+ min_val="-0.5"
+ max_val="0.5"
name="water_blur_multip"
top_pad="5"
width="200"