summaryrefslogtreecommitdiff
path: root/indra
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
parent0c358f78ab618de8727892a50cd3a3055dbdf956 (diff)
storm-1156: remove "test day" controls and associated code
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterdaycycle.cpp134
-rw-r--r--indra/newview/llfloaterdaycycle.h18
-rw-r--r--indra/newview/skins/default/xui/en/floater_day_cycle_options.xml119
3 files changed, 0 insertions, 271 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>(
diff --git a/indra/newview/llfloaterdaycycle.h b/indra/newview/llfloaterdaycycle.h
index b09d1d5bf4..1454298269 100644
--- a/indra/newview/llfloaterdaycycle.h
+++ b/indra/newview/llfloaterdaycycle.h
@@ -83,15 +83,6 @@ public:
/// if you change the combo box, change the frame
static void onKeyPresetChanged(LLUICtrl* ctrl, void* userData);
- /// run this when user says to run the sky animation
- static void onRunAnimSky(void* userData);
-
- /// run this when user says to stop the sky animation
- static void onStopAnimSky(void* userData);
-
- /// if you change the combo box, change the frame
- static void onTimeRateChanged(LLUICtrl* ctrl, void* userData);
-
/// add a new key on slider
static void onAddKey(void* userData);
@@ -101,15 +92,6 @@ public:
/// delete a key frame
static void onDeleteKey(void* userData);
- /// button to load day
- static void onLoadDayCycle(void* userData);
-
- /// button to save day
- static void onSaveDayCycle(void* userData);
-
- /// toggle for Linden time
- static void onUseLindenTime(void* userData);
-
//// menu management
diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
index b54dc87d24..59cdb295ef 100644
--- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
+++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml
@@ -411,125 +411,6 @@
left="12"
top="101"
width="240" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_pad="15"
- name="DayCycleText2"
- top_delta="71"
- width="120">
- Length of Cycle:
- </text>
- <spinner
- control_name="WLLengthOfDayHour"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="0"
- label="Hour"
- label_width="33"
- layout="topleft"
- left_delta="-3"
- max_val="100"
- name="WLLengthOfDayHour"
- top_pad="4"
- width="74" />
- <spinner
- control_name="WLLengthOfDayMin"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="0"
- label="Min"
- label_width="25"
- layout="topleft"
- left_pad="2"
- max_val="59"
- name="WLLengthOfDayMin"
- top_delta="0"
- width="65" />
- <spinner
- control_name="WLLengthOfDaySec"
- decimal_digits="0"
- follows="left|top"
- height="16"
- increment="1"
- initial_value="24"
- label="Sec"
- label_width="25"
- layout="topleft"
- left_pad="2"
- max_val="59"
- name="WLLengthOfDaySec"
- top_delta="0"
- width="65"/>
- <text
- type="string"
- halign="right"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-23"
- name="DayCycleText3"
- top="114"
- width="85">
- Preview :
- </text>
- <button
- height="20"
- label="Play"
- label_selected="Play"
- layout="topleft"
- left="480"
- name="WLAnimSky"
- top_pad="5"
- width="83" />
- <button
- height="20"
- label="Stop!"
- label_selected="Stop"
- layout="topleft"
- left_pad="4"
- name="WLStopAnimSky"
- top_delta="0"
- width="83" />
- <button
- height="20"
- label="Use Estate Time"
- label_selected="Go to Estate Time"
- layout="topleft"
- left="480"
- name="WLUseLindenTime"
- top_pad="9"
- width="170" />
- <button
- height="20"
- label="Save Test Day"
- label_selected="Save Test Day"
- layout="topleft"
- left_delta="0"
- name="WLSaveDayCycle"
- top_pad="9"
- width="170" />
- <button
- height="20"
- label="Load Test Day"
- label_selected="Load Test Day"
- layout="topleft"
- left_delta="0"
- name="WLLoadDayCycle"
- top_pad="3"
- width="170" />
</panel>
</tab_container>
</floater>