diff options
| author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-31 18:24:01 +0300 |
|---|---|---|
| committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-31 18:24:01 +0300 |
| commit | 79fb8e2ec26dc2c5a42ef1ee48ebaaa39183c67b (patch) | |
| tree | 2747ceb9c211f677be9a595ba91b75e71506c529 /indra/newview/llviewermenu.cpp | |
| parent | 5476999e9dfeca48009b43e4fcc0967be5540572 (diff) | |
STORM-1126 WIP Windlight Estate Settings integration: pass 4
Changes:
* Fixed incorrect way to pass parameters to notifications.
* Fixed crashes in the Advanced Sky floater and the Region Terrain panel.
* Fixed initialization and multiple instantiation of the Day Cycle floater
(that might lead to incorrect behavior).
* Fixed and re-enabled committing env. settings changes to region.
* Fixed day cycle and sky settings being sent as empty arrays and therefore not passing validation on server.
It is now possible to change region environment settings.
* Added debug messages.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
| -rw-r--r-- | indra/newview/llviewermenu.cpp | 53 |
1 files changed, 22 insertions, 31 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 808ab1e344..a53f56ce33 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7625,70 +7625,62 @@ class LLWorldEnvSettings : public view_listener_t if (tod == "editor") { // if not there or is hidden, show it + // *TODO replace with LLFloaterWindLight::show(LLEnvKey::SCOPE_LOCAL) to make sure we're using the right scope? LLFloaterReg::toggleInstance("env_settings"); return true; } - else if(gSavedSettings.getBOOL("UseEnvironmentFromRegion")) + + if (gSavedSettings.getBOOL("UseEnvironmentFromRegion")) { LLNotifications::instance().add("EnvLockedUsingRegion", LLSD(), LLSD()); + return true; } - else - { + if (tod == "sunrise") { // set the value, turn off animation - LLWLParamManager::getInstance()->mAnimator.setDayTime(0.25); - LLWLParamManager::getInstance()->mAnimator.deactivate(); + LLWLParamManager::getInstance()->mAnimator.setDayTime(0.25); + LLWLParamManager::getInstance()->mAnimator.deactivate(); // then call update once - LLWLParamManager::getInstance()->mAnimator.update( - LLWLParamManager::getInstance()->mCurParams); + LLWLParamManager::getInstance()->mAnimator.update( + LLWLParamManager::getInstance()->mCurParams); } else if (tod == "noon") { // set the value, turn off animation - LLWLParamManager::getInstance()->mAnimator.setDayTime(0.567); - LLWLParamManager::getInstance()->mAnimator.deactivate(); + LLWLParamManager::getInstance()->mAnimator.setDayTime(0.567); + LLWLParamManager::getInstance()->mAnimator.deactivate(); // then call update once - LLWLParamManager::getInstance()->mAnimator.update( - LLWLParamManager::getInstance()->mCurParams); + LLWLParamManager::getInstance()->mAnimator.update( + LLWLParamManager::getInstance()->mCurParams); } else if (tod == "sunset") { // set the value, turn off animation - LLWLParamManager::getInstance()->mAnimator.setDayTime(0.75); - LLWLParamManager::getInstance()->mAnimator.deactivate(); + LLWLParamManager::getInstance()->mAnimator.setDayTime(0.75); + LLWLParamManager::getInstance()->mAnimator.deactivate(); // then call update once - LLWLParamManager::getInstance()->mAnimator.update( - LLWLParamManager::getInstance()->mCurParams); + LLWLParamManager::getInstance()->mAnimator.update( + LLWLParamManager::getInstance()->mCurParams); } else if (tod == "midnight") { // set the value, turn off animation - LLWLParamManager::getInstance()->mAnimator.setDayTime(0.0); - LLWLParamManager::getInstance()->mAnimator.deactivate(); + LLWLParamManager::getInstance()->mAnimator.setDayTime(0.0); + LLWLParamManager::getInstance()->mAnimator.deactivate(); // then call update once - LLWLParamManager::getInstance()->mAnimator.update( - LLWLParamManager::getInstance()->mCurParams); + LLWLParamManager::getInstance()->mAnimator.update( + LLWLParamManager::getInstance()->mCurParams); } else { - LLWLParamManager::getInstance()->mAnimator.activate(LLWLAnimator::TIME_LINDEN); - } + LLWLParamManager::getInstance()->mAnimator.activate(LLWLAnimator::TIME_LINDEN); } - return true; - } -}; -/// Water Menu callbacks -class LLWorldWaterSettings : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterReg::toggleInstance("env_water"); return true; } }; @@ -7926,7 +7918,6 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun"); view_listener_t::addMenu(new LLWorldEnvSettings(), "World.EnvSettings"); - view_listener_t::addMenu(new LLWorldWaterSettings(), "World.WaterSettings"); view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess"); view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle"); |
