diff options
author | Graham Linden <graham@lindenlab.com> | 2018-07-04 01:33:22 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-07-04 01:33:22 +0100 |
commit | 9bacdc988637615af3e4971eb6dbe3b167720a71 (patch) | |
tree | a0d11578f50d9f69317cc8fef9d7b0d05e705a5e /indra/newview/llpaneleditsky.cpp | |
parent | a682d91ea1f7c566269fbad40415639b67cee096 (diff) |
Fix up sun glow/size bindings in edit panel.
Diffstat (limited to 'indra/newview/llpaneleditsky.cpp')
-rw-r--r-- | indra/newview/llpaneleditsky.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/indra/newview/llpaneleditsky.cpp b/indra/newview/llpaneleditsky.cpp index 3f1ca69178..3c976c299e 100644 --- a/indra/newview/llpaneleditsky.cpp +++ b/indra/newview/llpaneleditsky.cpp @@ -330,13 +330,9 @@ void LLPanelSettingsSkySunMoonTab::refresh() getChild<LLColorSwatchCtrl>(FIELD_SKY_SUN_MOON_COLOR)->set(mSkySettings->getSunlightColor() / SLIDER_SCALE_SUN_AMBIENT); LLColor3 glow(mSkySettings->getGlow()); - - glow.mV[0] = 2 - (glow.mV[0] / SLIDER_SCALE_GLOW_R); - glow.mV[2] /= SLIDER_SCALE_GLOW_B; - - getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setValue(glow.mV[0]); - getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setValue(glow.mV[2]); - + + getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->setValue(2.0 - (glow.mV[0] / SLIDER_SCALE_GLOW_R)); + getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->setValue(glow.mV[2] / SLIDER_SCALE_GLOW_B); getChild<LLUICtrl>(FIELD_SKY_STAR_BRIGHTNESS)->setValue(mSkySettings->getStarBrightness()); getChild<LLJoystickQuaternion>(FIELD_SKY_SUN_ROTATION)->setRotation(mSkySettings->getSunRotation()); getChild<LLTextureCtrl>(FIELD_SKY_SUN_IMAGE)->setValue(mSkySettings->getSunTextureId()); @@ -356,10 +352,9 @@ void LLPanelSettingsSkySunMoonTab::onSunMoonColorChanged() void LLPanelSettingsSkySunMoonTab::onGlowChanged() { - LLColor3 glow(getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal(), 0.0f, - getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal()); + LLColor3 glow(getChild<LLUICtrl>(FIELD_SKY_GLOW_SIZE)->getValue().asReal(), 0.0f, getChild<LLUICtrl>(FIELD_SKY_GLOW_FOCUS)->getValue().asReal()); - glow.mV[0] = (2 - glow.mV[0]) * SLIDER_SCALE_GLOW_R; + glow.mV[0] = (2.0f - glow.mV[0]) * SLIDER_SCALE_GLOW_R; glow.mV[2] *= SLIDER_SCALE_GLOW_B; mSkySettings->setGlow(glow); |