summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterdaycycle.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-05-25 08:55:03 -0400
committerOz Linden <oz@lindenlab.com>2011-05-25 08:55:03 -0400
commit5fc0cd9bf7d0c7f97bb63c5f887cce27e27a05f9 (patch)
treeed0bce867a74feaf4045861e9ce85456a92692d9 /indra/newview/llfloaterdaycycle.cpp
parent0c358f78ab618de8727892a50cd3a3055dbdf956 (diff)
storm-1156: remove "test day" controls and associated code
Diffstat (limited to 'indra/newview/llfloaterdaycycle.cpp')
-rw-r--r--indra/newview/llfloaterdaycycle.cpp134
1 files changed, 0 insertions, 134 deletions
diff --git a/indra/newview/llfloaterdaycycle.cpp b/indra/newview/llfloaterdaycycle.cpp
index eb429d7803..ebf7b98148 100644
--- a/indra/newview/llfloaterdaycycle.cpp
+++ b/indra/newview/llfloaterdaycycle.cpp
@@ -114,47 +114,16 @@ void LLFloaterDayCycle::initCallbacks(void)
childSetCommitCallback("WLCurKeyMin", onKeyTimeChanged, NULL);
childSetCommitCallback("WLKeyPresets", onKeyPresetChanged, NULL);
- childSetCommitCallback("WLLengthOfDayHour", onTimeRateChanged, NULL);
- childSetCommitCallback("WLLengthOfDayMin", onTimeRateChanged, NULL);
- childSetCommitCallback("WLLengthOfDaySec", onTimeRateChanged, NULL);
- childSetAction("WLUseLindenTime", onUseLindenTime, NULL);
- childSetAction("WLAnimSky", onRunAnimSky, NULL);
- childSetAction("WLStopAnimSky", onStopAnimSky, NULL);
-
- childSetAction("WLLoadDayCycle", onLoadDayCycle, NULL);
- childSetAction("WLSaveDayCycle", onSaveDayCycle, NULL);
-
childSetAction("WLAddKey", onAddKey, NULL);
childSetAction("WLDeleteKey", onDeleteKey, NULL);
}
void LLFloaterDayCycle::syncMenu()
{
-// std::map<std::string, LLVector4> & currentParams = LLWLParamManager::getInstance()->mCurParams.mParamValues;
-
// set time
LLMultiSliderCtrl* sldr = LLFloaterDayCycle::sDayCycle->getChild<LLMultiSliderCtrl>("WLTimeSlider");
sldr->setCurSliderValue((F32)LLWLParamManager::getInstance()->mAnimator.getDayTime() * sHoursPerDay);
- LLSpinCtrl* secSpin = sDayCycle->getChild<LLSpinCtrl>("WLLengthOfDaySec");
- LLSpinCtrl* minSpin = sDayCycle->getChild<LLSpinCtrl>("WLLengthOfDayMin");
- LLSpinCtrl* hourSpin = sDayCycle->getChild<LLSpinCtrl>("WLLengthOfDayHour");
-
- F32 curRate;
- F32 hours, min, sec;
-
- // get the current rate
- curRate = LLWLParamManager::getInstance()->mDay.mDayRate;
- hours = (F32)((int)(curRate / 60 / 60));
- curRate -= (hours * 60 * 60);
- min = (F32)((int)(curRate / 60));
- curRate -= (min * 60);
- sec = curRate;
-
- hourSpin->setValue(hours);
- minSpin->setValue(min);
- secSpin->setValue(sec);
-
// turn off Use Estate Time button if it's already being used
if( LLWLParamManager::getInstance()->mAnimator.getUseLindenTime())
{
@@ -309,81 +278,6 @@ void LLFloaterDayCycle::onClose(bool app_quitting)
}
}
-void LLFloaterDayCycle::onRunAnimSky(void* userData)
-{
- // if no keys, do nothing
- if(sSliderToKey.size() == 0)
- {
- return;
- }
-
- LLMultiSliderCtrl* sldr;
- sldr = sDayCycle->getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
- llassert_always(sSliderToKey.size() == sldr->getValue().size());
-
- LLMultiSliderCtrl* tSldr = sDayCycle->getChild<LLMultiSliderCtrl>("WLTimeSlider");
-
- sPreviousTimeType = LLWLParamManager::getInstance()->mAnimator.getTimeType();
-
- // turn off linden time
- LLWLParamManager::getInstance()->mAnimator.setTimeType(LLWLAnimator::TIME_CUSTOM);
-
- // set the param manager's track to the new one
- LLWLParamManager::getInstance()->resetAnimator(tSldr->getCurSliderValue() / sHoursPerDay, true);
-
- llassert_always(LLWLParamManager::getInstance()->mAnimator.mTimeTrack.size() == sldr->getValue().size());
-}
-
-void LLFloaterDayCycle::onStopAnimSky(void* userData)
-{
- // if no keys, do nothing
- if(sSliderToKey.size() == 0) {
- return;
- }
-
- LLWLParamManager::getInstance()->mAnimator.deactivate(); // turn off animation and using linden time
- LLMultiSliderCtrl* tSldr = sDayCycle->getChild<LLMultiSliderCtrl>("WLTimeSlider");
- LLWLParamManager::getInstance()->resetAnimator(tSldr->getCurSliderValue() / sHoursPerDay, false);
- LLWLParamManager::getInstance()->mAnimator.setTimeType(sPreviousTimeType);
-}
-
-void LLFloaterDayCycle::onUseLindenTime(void* userData)
-{
- LLFloaterWindLight* wlfloater = LLFloaterReg::findTypedInstance<LLFloaterWindLight>("env_windlight");
- if (wlfloater)
- {
- LLComboBox* box = wlfloater->getChild<LLComboBox>("WLPresetsCombo");
- box->selectByValue("");
- }
- LLWLParamManager::getInstance()->mAnimator.deactivate();
-}
-
-void LLFloaterDayCycle::onLoadDayCycle(void* userData)
-{
- LLWLParamManager::getInstance()->mDay.loadDayCycleFromFile("Default.xml");
-
- // sync it all up
- syncSliderTrack();
- syncMenu();
-
- // set the param manager's track to the new one
- LLMultiSliderCtrl* tSldr;
- tSldr = sDayCycle->getChild<LLMultiSliderCtrl>(
- "WLTimeSlider");
- LLWLParamManager::getInstance()->resetAnimator(
- tSldr->getCurSliderValue() / sHoursPerDay, false);
-
- // and draw it
- LLWLParamManager::getInstance()->mAnimator.update(
- LLWLParamManager::getInstance()->mCurParams);
-}
-
-void LLFloaterDayCycle::onSaveDayCycle(void* userData)
-{
- LLWLParamManager::getInstance()->mDay.saveDayCycle("Default.xml");
-}
-
-
void LLFloaterDayCycle::onTimeSliderMoved(LLUICtrl* ctrl, void* userData)
{
LLMultiSliderCtrl* sldr = sDayCycle->getChild<LLMultiSliderCtrl>(
@@ -501,34 +395,6 @@ void LLFloaterDayCycle::onKeyPresetChanged(LLUICtrl* ctrl, void* userData)
syncTrack();
}
-void LLFloaterDayCycle::onTimeRateChanged(LLUICtrl* ctrl, void* userData)
-{
- // get the time
- LLSpinCtrl* secSpin = sDayCycle->getChild<LLSpinCtrl>(
- "WLLengthOfDaySec");
-
- LLSpinCtrl* minSpin = sDayCycle->getChild<LLSpinCtrl>(
- "WLLengthOfDayMin");
-
- LLSpinCtrl* hourSpin = sDayCycle->getChild<LLSpinCtrl>(
- "WLLengthOfDayHour");
-
- F32 hour;
- hour = (F32)hourSpin->getValue().asReal();
- F32 min;
- min = (F32)minSpin->getValue().asReal();
- F32 sec;
- sec = (F32)secSpin->getValue().asReal();
-
- F32 time = 60.0f * 60.0f * hour + 60.0f * min + sec;
- if(time <= 0) {
- time = 1;
- }
- LLWLParamManager::getInstance()->mDay.mDayRate = time;
-
- syncTrack();
-}
-
void LLFloaterDayCycle::onAddKey(void* userData)
{
LLComboBox* comboBox = sDayCycle->getChild<LLComboBox>(