summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-03-31 18:46:56 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-03-31 18:46:56 +0300
commit5a0547cdc366678a21c23ac4669d9e1a867ca331 (patch)
tree93664b4de3fdd7993f52150e6ac47c9391830a67 /indra/newview/llviewermenu.cpp
parent5c3ae68299f79f3a705fa4b3e9cd262b56695318 (diff)
parent8c04829110028c951d05470d54de5bf3708ff773 (diff)
STORM-1126 merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp58
1 files changed, 25 insertions, 33 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 7c8f363f11..0fc58fd633 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7563,69 +7563,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;
}
-
+
+ if (gSavedSettings.getBOOL("UseEnvironmentFromRegion"))
+ {
+ LLNotifications::instance().add("EnvLockedUsingRegion", LLSD(), LLSD());
+ return true;
+ }
+
if (tod == "sunrise")
{
// set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.25);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
+ LLWLParamManager::getInstance()->mAnimator.setDayTime(0.25);
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
// then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLWLParamManager::getInstance()->mAnimator.update(
+ LLWLParamManager::getInstance()->mCurParams);
}
else if (tod == "noon")
{
// set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.567);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
+ LLWLParamManager::getInstance()->mAnimator.setDayTime(0.567);
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
// then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLWLParamManager::getInstance()->mAnimator.update(
+ LLWLParamManager::getInstance()->mCurParams);
}
else if (tod == "sunset")
{
// set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.75);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
+ LLWLParamManager::getInstance()->mAnimator.setDayTime(0.75);
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
// then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLWLParamManager::getInstance()->mAnimator.update(
+ LLWLParamManager::getInstance()->mCurParams);
}
else if (tod == "midnight")
{
// set the value, turn off animation
- LLWLParamManager::instance()->mAnimator.setDayTime(0.0);
- LLWLParamManager::instance()->mAnimator.mIsRunning = false;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
+ LLWLParamManager::getInstance()->mAnimator.setDayTime(0.0);
+ LLWLParamManager::getInstance()->mAnimator.deactivate();
// then call update once
- LLWLParamManager::instance()->mAnimator.update(
- LLWLParamManager::instance()->mCurParams);
+ LLWLParamManager::getInstance()->mAnimator.update(
+ LLWLParamManager::getInstance()->mCurParams);
}
else
{
- LLWLParamManager::instance()->mAnimator.mIsRunning = true;
- LLWLParamManager::instance()->mAnimator.mUseLindenTime = true;
+ 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;
}
};
@@ -7876,7 +7869,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");