#include <llfloaterdaycycle.h>
Public Member Functions | |
LLFloaterDayCycle () | |
virtual | ~LLFloaterDayCycle () |
void | initHelpBtn (const char *name, const char *xml_alert) |
void | initCallbacks (void) |
initialize all | |
void | deletePreset (LLString &presetName) |
delete any and all reference to a preset | |
virtual void | onClose (bool app_quitting) |
stuff to do on exit | |
Static Public Member Functions | |
static void | onClickHelp (void *data) |
help button stuff | |
static LLFloaterDayCycle * | instance () |
one and one instance only | |
static void | onTimeSliderMoved (LLUICtrl *ctrl, void *userData) |
on time slider moved | |
static void | onKeyTimeMoved (LLUICtrl *ctrl, void *userData) |
what happens when you move the key frame | |
static void | onKeyTimeChanged (LLUICtrl *ctrl, void *userData) |
what happens when you change the key frame's time | |
static void | onKeyPresetChanged (LLUICtrl *ctrl, void *userData) |
if you change the combo box, change the frame | |
static void | onRunAnimSky (void *userData) |
run this when user says to run the sky animation | |
static void | onStopAnimSky (void *userData) |
run this when user says to stop the sky animation | |
static void | onTimeRateChanged (LLUICtrl *ctrl, void *userData) |
if you change the combo box, change the frame | |
static void | onAddKey (void *userData) |
add a new key on slider | |
static void | onDeleteKey (void *userData) |
delete a key frame | |
static void | onLoadDayCycle (void *userData) |
button to load day | |
static void | onSaveDayCycle (void *userData) |
button to save day | |
static void | onUseLindenTime (void *userData) |
toggle for Linden time | |
static void | show () |
show off our menu | |
static bool | isOpen () |
return if the menu exists or not | |
static void | syncMenu () |
sync up sliders with day cycle structure | |
static void | syncSliderTrack () |
static void | syncTrack () |
makes sure day cycle data structure has what's in menu | |
static void | addSliderKey (F32 time, const LLString &presetName) |
add a slider to the track | |
Static Private Attributes | |
static LLFloaterDayCycle * | sDayCycle = NULL |
static std::map< LLString, LLWLSkyKey > | sSliderToKey |
static const F32 | sHoursPerDay = 24.0f |
Definition at line 54 of file llfloaterdaycycle.h.
LLFloaterDayCycle::LLFloaterDayCycle | ( | ) |
Definition at line 65 of file llfloaterdaycycle.cpp.
References LLComboBox::add(), LLMultiSliderCtrl::addSlider(), LLUICtrlFactory::buildFloater(), LLSingleton< LLUICtrlFactory >::getInstance(), initCallbacks(), LLWLParamManager::instance(), LLWLParamManager::mParamList, NULL, and LLComboBox::selectFirstItem().
Referenced by instance().
LLFloaterDayCycle::~LLFloaterDayCycle | ( | ) | [virtual] |
Definition at line 94 of file llfloaterdaycycle.cpp.
void LLFloaterDayCycle::onClickHelp | ( | void * | data | ) | [static] |
help button stuff
Definition at line 98 of file llfloaterdaycycle.cpp.
References LLFloater::addDependentFloater(), LLViewerWindow::alertXml(), LLFloaterView::getParentFloater(), gFloaterView, gViewerWindow, and instance().
Referenced by initHelpBtn().
void LLFloaterDayCycle::initHelpBtn | ( | const char * | name, | |
const char * | xml_alert | |||
) |
Definition at line 115 of file llfloaterdaycycle.cpp.
References LLPanel::childSetAction(), and onClickHelp().
Referenced by initCallbacks().
void LLFloaterDayCycle::initCallbacks | ( | void | ) |
initialize all
Definition at line 120 of file llfloaterdaycycle.cpp.
References LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), initHelpBtn(), NULL, onAddKey(), onDeleteKey(), onKeyPresetChanged(), onKeyTimeChanged(), onKeyTimeMoved(), onLoadDayCycle(), onRunAnimSky(), onSaveDayCycle(), onStopAnimSky(), onTimeRateChanged(), onTimeSliderMoved(), and onUseLindenTime().
Referenced by LLFloaterDayCycle().
LLFloaterDayCycle * LLFloaterDayCycle::instance | ( | void | ) | [static] |
one and one instance only
Definition at line 237 of file llfloaterdaycycle.cpp.
References LLFloaterDayCycle(), LLFloater::open(), sDayCycle, LLFloater::setFocus(), and TRUE.
Referenced by LLFloaterWindLight::deleteAlertCallback(), LLFloaterWater::deleteAlertCallback(), LLFloaterWindLight::newPromptCallback(), onClickHelp(), show(), and LLWLParamManager::update().
void LLFloaterDayCycle::onTimeSliderMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
on time slider moved
get the slider value
Definition at line 352 of file llfloaterdaycycle.cpp.
References LLView::getChild(), LLMultiSliderCtrl::getCurSliderValue(), LLWLParamManager::instance(), LLWLParamManager::mAnimator, LLWLAnimator::mIsRunning, LLWLAnimator::mUseLindenTime, sDayCycle, LLWLAnimator::setDayTime(), sHoursPerDay, and LLWLAnimator::update().
Referenced by initCallbacks().
void LLFloaterDayCycle::onKeyTimeMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
what happens when you move the key frame
Definition at line 370 of file llfloaterdaycycle.cpp.
References LLView::getChild(), S32, sDayCycle, LLCtrlSelectionInterface::selectByValue(), sSliderToKey, and syncTrack().
Referenced by initCallbacks().
void LLFloaterDayCycle::onKeyTimeChanged | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
what happens when you change the key frame's time
Definition at line 413 of file llfloaterdaycycle.cpp.
References LLView::getChild(), LLMultiSliderCtrl::getCurSlider(), LLMultiSliderCtrl::getCurSliderValue(), sDayCycle, LLMultiSliderCtrl::setCurSliderValue(), sHoursPerDay, sSliderToKey, syncTrack(), and TRUE.
Referenced by initCallbacks().
void LLFloaterDayCycle::onKeyPresetChanged | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
if you change the combo box, change the frame
Definition at line 442 of file llfloaterdaycycle.cpp.
References LLSD::asString(), LLView::getChild(), LLComboBox::getSelectedValue(), sDayCycle, sSliderToKey, and syncTrack().
Referenced by initCallbacks().
void LLFloaterDayCycle::onRunAnimSky | ( | void * | userData | ) | [static] |
run this when user says to run the sky animation
Definition at line 279 of file llfloaterdaycycle.cpp.
References LLView::getChild(), LLMultiSliderCtrl::getValue(), LLWLParamManager::instance(), llassert_always, LLWLParamManager::mAnimator, LLWLAnimator::mUseLindenTime, LLWLParamManager::resetAnimator(), sDayCycle, sHoursPerDay, LLSD::size(), and sSliderToKey.
Referenced by initCallbacks().
void LLFloaterDayCycle::onStopAnimSky | ( | void * | userData | ) | [static] |
run this when user says to stop the sky animation
Definition at line 304 of file llfloaterdaycycle.cpp.
References LLWLParamManager::instance(), LLWLParamManager::mAnimator, LLWLAnimator::mIsRunning, LLWLAnimator::mUseLindenTime, and sSliderToKey.
Referenced by initCallbacks().
void LLFloaterDayCycle::onTimeRateChanged | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
if you change the combo box, change the frame
Definition at line 469 of file llfloaterdaycycle.cpp.
References LLSD::asReal(), LLView::getChild(), LLSpinCtrl::getValue(), LLWLParamManager::instance(), LLWLParamManager::mDay, LLWLDayCycle::mDayRate, sDayCycle, and syncTrack().
Referenced by initCallbacks().
void LLFloaterDayCycle::onAddKey | ( | void * | userData | ) | [static] |
add a new key on slider
Definition at line 497 of file llfloaterdaycycle.cpp.
References addSliderKey(), LLSD::asString(), LLView::getChild(), LLComboBox::getSelectedValue(), llassert_always, sDayCycle, sSliderToKey, and syncTrack().
Referenced by initCallbacks().
void LLFloaterDayCycle::deletePreset | ( | LLString & | presetName | ) |
delete any and all reference to a preset
delete any reference
Definition at line 542 of file llfloaterdaycycle.cpp.
References LLMultiSliderCtrl::deleteSlider(), LLView::getChild(), sDayCycle, and sSliderToKey.
void LLFloaterDayCycle::onDeleteKey | ( | void * | userData | ) | [static] |
delete a key frame
Definition at line 560 of file llfloaterdaycycle.cpp.
References LLView::getChild(), S32, sDayCycle, LLCtrlSelectionInterface::selectByValue(), LLSpinCtrl::set(), sSliderToKey, and syncTrack().
Referenced by initCallbacks().
void LLFloaterDayCycle::onLoadDayCycle | ( | void * | userData | ) | [static] |
button to load day
Definition at line 326 of file llfloaterdaycycle.cpp.
References LLView::getChild(), LLMultiSliderCtrl::getCurSliderValue(), LLWLParamManager::instance(), LLWLDayCycle::loadDayCycle(), LLWLParamManager::mAnimator, LLWLParamManager::mDay, LLWLParamManager::resetAnimator(), sDayCycle, sHoursPerDay, syncMenu(), syncSliderTrack(), and LLWLAnimator::update().
Referenced by initCallbacks().
void LLFloaterDayCycle::onSaveDayCycle | ( | void * | userData | ) | [static] |
button to save day
Definition at line 346 of file llfloaterdaycycle.cpp.
References LLWLParamManager::instance(), LLWLParamManager::mDay, and LLWLDayCycle::saveDayCycle().
Referenced by initCallbacks().
void LLFloaterDayCycle::onUseLindenTime | ( | void * | userData | ) | [static] |
toggle for Linden time
Definition at line 316 of file llfloaterdaycycle.cpp.
References LLView::getChild(), LLWLParamManager::instance(), LLFloaterWindLight::instance(), LLWLParamManager::mAnimator, LLWLAnimator::mIsRunning, LLWLAnimator::mUseLindenTime, and LLCtrlSelectionInterface::selectByValue().
Referenced by initCallbacks().
void LLFloaterDayCycle::show | ( | ) | [static] |
show off our menu
Definition at line 257 of file llfloaterdaycycle.cpp.
References instance(), LLFloater::open(), syncMenu(), and syncSliderTrack().
Referenced by LLWorldDayCycle::handleEvent(), LLPanelEstateInfo::onClickEditDayCycle(), and LLFloaterWindLight::onOpenDayCycle().
bool LLFloaterDayCycle::isOpen | ( | void | ) | [static] |
return if the menu exists or not
Definition at line 248 of file llfloaterdaycycle.cpp.
References NULL, and sDayCycle.
Referenced by LLFloaterWindLight::deleteAlertCallback(), LLFloaterWater::deleteAlertCallback(), LLFloaterWindLight::newPromptCallback(), and LLWLParamManager::update().
void LLFloaterDayCycle::onClose | ( | bool | app_quitting | ) | [virtual] |
stuff to do on exit
Reimplemented from LLFloater.
Definition at line 271 of file llfloaterdaycycle.cpp.
References FALSE, sDayCycle, and LLFloater::setVisible().
void LLFloaterDayCycle::syncMenu | ( | ) | [static] |
sync up sliders with day cycle structure
Definition at line 145 of file llfloaterdaycycle.cpp.
References LLPanel::childDisable(), LLPanel::childEnable(), LLView::getChild(), LLWLParamManager::instance(), LLWLParamManager::mDay, LLWLDayCycle::mDayRate, sDayCycle, LLMultiSliderCtrl::setCurSliderValue(), LLSpinCtrl::setValue(), and sHoursPerDay.
Referenced by onLoadDayCycle(), show(), and LLWLParamManager::update().
void LLFloaterDayCycle::syncSliderTrack | ( | ) | [static] |
Definition at line 183 of file llfloaterdaycycle.cpp.
References addSliderKey(), LLMultiSliderCtrl::clear(), LLView::getChild(), LLWLParamManager::instance(), LLWLParamManager::mDay, LLWLDayCycle::mTimeMap, sDayCycle, sHoursPerDay, and sSliderToKey.
Referenced by onLoadDayCycle(), and show().
void LLFloaterDayCycle::syncTrack | ( | ) | [static] |
makes sure day cycle data structure has what's in menu
Definition at line 200 of file llfloaterdaycycle.cpp.
References LLWLDayCycle::addKey(), LLWLDayCycle::clearKeys(), LLView::getChild(), LLMultiSliderCtrl::getValue(), LLWLParamManager::instance(), llassert_always, LLWLParamManager::mAnimator, LLWLParamManager::mDay, LLWLParamManager::resetAnimator(), sDayCycle, sHoursPerDay, LLSD::size(), sSliderToKey, and LLWLAnimator::update().
Referenced by onAddKey(), onDeleteKey(), onKeyPresetChanged(), onKeyTimeChanged(), onKeyTimeMoved(), and onTimeRateChanged().
add a slider to the track
Definition at line 517 of file llfloaterdaycycle.cpp.
References LLMultiSliderCtrl::addSlider(), LLView::getChild(), LLMultiSliderCtrl::getCurSliderValue(), LLMultiSliderCtrl::getValue(), llassert_always, LLStringBase< char >::null, LLWLSkyKey::presetName, sDayCycle, LLSD::size(), sSliderToKey, and LLWLSkyKey::time.
Referenced by onAddKey(), and syncSliderTrack().
LLFloaterDayCycle * LLFloaterDayCycle::sDayCycle = NULL [static, private] |
Definition at line 137 of file llfloaterdaycycle.h.
Referenced by addSliderKey(), deletePreset(), instance(), isOpen(), onAddKey(), onClose(), onDeleteKey(), onKeyPresetChanged(), onKeyTimeChanged(), onKeyTimeMoved(), onLoadDayCycle(), onRunAnimSky(), onTimeRateChanged(), onTimeSliderMoved(), syncMenu(), syncSliderTrack(), and syncTrack().
std::map< LLString, LLWLSkyKey > LLFloaterDayCycle::sSliderToKey [static, private] |
Definition at line 140 of file llfloaterdaycycle.h.
Referenced by addSliderKey(), deletePreset(), onAddKey(), onDeleteKey(), onKeyPresetChanged(), onKeyTimeChanged(), onKeyTimeMoved(), onRunAnimSky(), onStopAnimSky(), syncSliderTrack(), and syncTrack().
const F32 LLFloaterDayCycle::sHoursPerDay = 24.0f [static, private] |
Definition at line 142 of file llfloaterdaycycle.h.
Referenced by onKeyTimeChanged(), onLoadDayCycle(), onRunAnimSky(), onTimeSliderMoved(), syncMenu(), syncSliderTrack(), and syncTrack().