summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-05-16 17:17:01 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-05-16 17:17:01 +0300
commitcccca566bd2365c88cca819729c5432af9dfa52f (patch)
tree8d81a737b1c6bf087a4d7330f1948155f554fcf2 /indra/newview/llviewermenu.cpp
parent0d7ea0e5abb4df0a18f1d8b73cce81dc2070afad (diff)
STORM-1245 WIP Reimplementing management of local presets according to the new spec.
User environment preferences are now persistent. TODO: Implement applying region env. settings.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp38
1 files changed, 4 insertions, 34 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 54fc4a2bb7..4a0e9fa766 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7587,51 +7587,21 @@ class LLWorldEnvSettings : public view_listener_t
return true;
}
- if (gSavedSettings.getBOOL("UseEnvironmentFromRegion"))
- {
- LLNotifications::instance().add("EnvLockedUsingRegion", LLSD(), LLSD());
- return true;
- }
-
if (tod == "sunrise")
{
- // set the value, turn off animation
- LLWLParamManager::getInstance()->mAnimator.setDayTime(0.25);
- LLWLParamManager::getInstance()->mAnimator.deactivate();
-
- // then call update once
- LLWLParamManager::getInstance()->mAnimator.update(
- LLWLParamManager::getInstance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Sunrise");
}
else if (tod == "noon")
{
- // set the value, turn off animation
- LLWLParamManager::getInstance()->mAnimator.setDayTime(0.567);
- LLWLParamManager::getInstance()->mAnimator.deactivate();
-
- // then call update once
- LLWLParamManager::getInstance()->mAnimator.update(
- LLWLParamManager::getInstance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Midday");
}
else if (tod == "sunset")
{
- // set the value, turn off animation
- LLWLParamManager::getInstance()->mAnimator.setDayTime(0.75);
- LLWLParamManager::getInstance()->mAnimator.deactivate();
-
- // then call update once
- LLWLParamManager::getInstance()->mAnimator.update(
- LLWLParamManager::getInstance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Sunset");
}
else if (tod == "midnight")
{
- // set the value, turn off animation
- LLWLParamManager::getInstance()->mAnimator.setDayTime(0.0);
- LLWLParamManager::getInstance()->mAnimator.deactivate();
-
- // then call update once
- LLWLParamManager::getInstance()->mAnimator.update(
- LLWLParamManager::getInstance()->mCurParams);
+ LLEnvManagerNew::instance().setUseSkyPreset("Midnight");
}
else
{