#include <llfloaterwindlight.h>
Public Member Functions | |
LLFloaterWindLight () | |
virtual | ~LLFloaterWindLight () |
void | initCallbacks (void) |
initialize all | |
void | initHelpBtn (const char *name, const char *xml_alert) |
virtual void | onClose (bool app_quitting) |
stuff to do on exit | |
void | syncMenu () |
sync up sliders with parameters | |
Static Public Member Functions | |
static LLFloaterWindLight * | instance () |
one and one instance only | |
static void | onClickHelp (void *data) |
static void | newPromptCallback (S32 option, const LLString &text, void *userData) |
static void | onColorControlRMoved (LLUICtrl *ctrl, void *userData) |
general purpose callbacks for dealing with color controllers | |
static void | onColorControlGMoved (LLUICtrl *ctrl, void *userData) |
static void | onColorControlBMoved (LLUICtrl *ctrl, void *userData) |
static void | onColorControlIMoved (LLUICtrl *ctrl, void *userData) |
static void | onFloatControlMoved (LLUICtrl *ctrl, void *userData) |
static void | onBoolToggle (LLUICtrl *ctrl, void *userData) |
static void | onGlowRMoved (LLUICtrl *ctrl, void *userData) |
lighting callbacks for glow | |
static void | onGlowBMoved (LLUICtrl *ctrl, void *userData) |
that we want NEGATIVE (-) B | |
static void | onSunMoved (LLUICtrl *ctrl, void *userData) |
lighting callbacks for sun | |
static void | onFloatTweakMoved (LLUICtrl *ctrl, void *userData) |
handle if float is changed | |
static void | onStarAlphaMoved (LLUICtrl *ctrl, void *userData) |
for handling when the star slider is moved to adjust the alpha | |
static void | onNewPreset (void *userData) |
when user hits the load preset button | |
static void | onSavePreset (void *userData) |
when user hits the save preset button | |
static void | saveAlertCallback (S32 option, void *userdata) |
prompts a user when overwriting a preset | |
static void | onDeletePreset (void *userData) |
when user hits the save preset button | |
static void | deleteAlertCallback (S32 option, void *userdata) |
prompts a user when overwriting a preset | |
static void | onChangePresetName (LLUICtrl *ctrl, void *userData) |
what to do when you change the preset name | |
static void | onOpenDayCycle (void *userData) |
when user hits the save preset button | |
static void | onCloudScrollXMoved (LLUICtrl *ctrl, void *userData) |
handle cloud scrolling | |
static void | onCloudScrollYMoved (LLUICtrl *ctrl, void *userData) |
static void | onCloudScrollXToggled (LLUICtrl *ctrl, void *userData) |
static void | onCloudScrollYToggled (LLUICtrl *ctrl, void *userData) |
static void | show () |
show off our menu | |
static bool | isOpen () |
return if the menu exists or not | |
static void | deactivateAnimator () |
turn off animated skies | |
Static Private Attributes | |
static LLFloaterWindLight * | sWindLight = NULL |
static std::set< std::string > | sDefaultPresets |
Definition at line 49 of file llfloaterwindlight.h.
LLFloaterWindLight::LLFloaterWindLight | ( | ) |
Definition at line 69 of file llfloaterwindlight.cpp.
References LLComboBox::add(), LLUICtrlFactory::buildFloater(), LLSingleton< LLUICtrlFactory >::getInstance(), LLPanel::getString(), initCallbacks(), LLWLParamManager::instance(), LLWLParamManager::mParamList, NULL, sDefaultPresets, and LLCtrlSelectionInterface::selectByValue().
Referenced by instance().
LLFloaterWindLight::~LLFloaterWindLight | ( | ) | [virtual] |
Definition at line 108 of file llfloaterwindlight.cpp.
void LLFloaterWindLight::initCallbacks | ( | void | ) |
initialize all
Definition at line 112 of file llfloaterwindlight.cpp.
References LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), initHelpBtn(), LLWLParamManager::instance(), LLWLParamManager::mAmbient, LLWLParamManager::mBlueDensity, LLWLParamManager::mBlueHorizon, LLWLParamManager::mCloudColor, LLWLParamManager::mCloudCoverage, LLWLParamManager::mCloudDetail, LLWLParamManager::mCloudMain, LLWLParamManager::mCloudScale, LLWLParamManager::mDensityMult, LLWLParamManager::mDistanceMult, LLWLParamManager::mGlow, LLWLParamManager::mHazeDensity, LLWLParamManager::mHazeHorizon, LLWLParamManager::mLightnorm, LLWLParamManager::mMaxAlt, LLWLParamManager::mSunlight, LLWLParamManager::mWLGamma, NULL, onChangePresetName(), onCloudScrollXMoved(), onCloudScrollXToggled(), onCloudScrollYMoved(), onCloudScrollYToggled(), onColorControlBMoved(), onColorControlGMoved(), onColorControlIMoved(), onColorControlRMoved(), onDeletePreset(), onFloatControlMoved(), onGlowBMoved(), onGlowRMoved(), onNewPreset(), onOpenDayCycle(), onSavePreset(), onStarAlphaMoved(), onSunMoved(), LLSavedSettingsGlue::setBOOL(), and LLUICtrl::setCommitCallback().
Referenced by LLFloaterWindLight().
LLFloaterWindLight * LLFloaterWindLight::instance | ( | void | ) | [static] |
one and one instance only
Definition at line 446 of file llfloaterwindlight.cpp.
References LLFloaterWindLight(), LLFloater::open(), LLFloater::setFocus(), sWindLight, and TRUE.
Referenced by onClickHelp(), LLFloaterEnvSettings::onUseEstateTime(), LLFloaterDayCycle::onUseLindenTime(), show(), and LLWLParamManager::update().
void LLFloaterWindLight::onClickHelp | ( | void * | data | ) | [static] |
Definition at line 232 of file llfloaterwindlight.cpp.
References LLFloater::addDependentFloater(), LLViewerWindow::alertXml(), LLFloaterView::getParentFloater(), gFloaterView, gViewerWindow, and instance().
Referenced by initHelpBtn().
void LLFloaterWindLight::initHelpBtn | ( | const char * | name, | |
const char * | xml_alert | |||
) |
Definition at line 249 of file llfloaterwindlight.cpp.
References LLPanel::childSetAction(), and onClickHelp().
Referenced by initCallbacks().
void LLFloaterWindLight::newPromptCallback | ( | S32 | option, | |
const LLString & | text, | |||
void * | userData | |||
) | [static] |
Definition at line 254 of file llfloaterwindlight.cpp.
References LLComboBox::add(), LLWLParamManager::addParamSet(), LLViewerWindow::alertXml(), LLView::getChild(), LLComboBox::getSimple(), gViewerWindow, LLWLParamManager::instance(), LLFloaterDayCycle::instance(), LLFloaterDayCycle::isOpen(), LLWLParamManager::mCurParams, LLWLParamManager::mParamList, NULL, LLComboBox::remove(), LLWLParamManager::savePreset(), LLComboBox::selectFirstItem(), LLComboBox::setSelectedByValue(), LLComboBox::sortByName(), and sWindLight.
Referenced by onNewPreset().
void LLFloaterWindLight::onColorControlRMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
general purpose callbacks for dealing with color controllers
Definition at line 486 of file llfloaterwindlight.cpp.
References WLColorControl::b, LLPanel::childSetValue(), deactivateAnimator(), WLColorControl::g, LLSliderCtrl::getValueF32(), WLColorControl::hasSliderName, WLColorControl::i, LLWLParamManager::instance(), WLColorControl::isBlueHorizonOrDensity, WLColorControl::isSunOrAmbientColor, WLColorControl::mSliderName, LLWLParamManager::propagateParameters(), WLColorControl::r, sWindLight, and WLColorControl::update().
Referenced by initCallbacks().
void LLFloaterWindLight::onColorControlGMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 522 of file llfloaterwindlight.cpp.
References WLColorControl::b, LLPanel::childSetValue(), deactivateAnimator(), WLColorControl::g, LLSliderCtrl::getValueF32(), WLColorControl::hasSliderName, WLColorControl::i, LLWLParamManager::instance(), WLColorControl::isBlueHorizonOrDensity, WLColorControl::isSunOrAmbientColor, WLColorControl::mSliderName, LLWLParamManager::propagateParameters(), WLColorControl::r, sWindLight, and WLColorControl::update().
Referenced by initCallbacks().
void LLFloaterWindLight::onColorControlBMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 558 of file llfloaterwindlight.cpp.
References WLColorControl::b, LLPanel::childSetValue(), deactivateAnimator(), WLColorControl::g, LLSliderCtrl::getValueF32(), WLColorControl::hasSliderName, WLColorControl::i, LLWLParamManager::instance(), WLColorControl::isBlueHorizonOrDensity, WLColorControl::isSunOrAmbientColor, WLColorControl::mSliderName, LLWLParamManager::propagateParameters(), WLColorControl::r, sWindLight, and WLColorControl::update().
Referenced by initCallbacks().
void LLFloaterWindLight::onColorControlIMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 594 of file llfloaterwindlight.cpp.
References WLColorControl::b, LLPanel::childSetValue(), deactivateAnimator(), WLColorControl::g, LLSliderCtrl::getValueF32(), WLColorControl::hasSliderName, WLColorControl::i, LLWLParamManager::instance(), WLColorControl::isBlueHorizonOrDensity, WLColorControl::isSunOrAmbientColor, WLColorControl::mSliderName, LLWLParamManager::propagateParameters(), WLColorControl::r, sWindLight, and WLColorControl::update().
Referenced by initCallbacks().
void LLFloaterWindLight::onFloatControlMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 712 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), WLFloatControl::mult, LLWLParamManager::propagateParameters(), WLFloatControl::update(), and WLFloatControl::x.
Referenced by initCallbacks().
void LLFloaterWindLight::onBoolToggle | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 725 of file llfloaterwindlight.cpp.
References deactivateAnimator(), and LLCheckBoxCtrl::get().
void LLFloaterWindLight::onGlowRMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
lighting callbacks for glow
GLOW SPECIFIC CODE.
Definition at line 683 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), LLWLParamManager::propagateParameters(), WLColorControl::r, and WLColorControl::update().
Referenced by initCallbacks().
void LLFloaterWindLight::onGlowBMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
that we want NEGATIVE (-) B
that we want NEGATIVE (-) B and NOT by 20 as 20 is too big
Definition at line 698 of file llfloaterwindlight.cpp.
References WLColorControl::b, deactivateAnimator(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), LLWLParamManager::propagateParameters(), and WLColorControl::update().
Referenced by initCallbacks().
void LLFloaterWindLight::onSunMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
lighting callbacks for sun
Definition at line 739 of file llfloaterwindlight.cpp.
References deactivateAnimator(), F_TWO_PI, LLView::getChild(), LLWLParamSet::getEastAngle(), LLWLParamSet::getSunAngle(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), LLWLParamManager::mCurParams, LLWLParamManager::propagateParameters(), LLWLParamSet::setEastAngle(), LLWLParamSet::setSunAngle(), and sWindLight.
Referenced by initCallbacks().
void LLFloaterWindLight::onFloatTweakMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
handle if float is changed
Definition at line 766 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), and LLWLParamManager::propagateParameters().
void LLFloaterWindLight::onStarAlphaMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
for handling when the star slider is moved to adjust the alpha
Definition at line 777 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), LLWLParamManager::mCurParams, and LLWLParamSet::setStarBrightness().
Referenced by initCallbacks().
void LLFloaterWindLight::onNewPreset | ( | void * | userData | ) | [static] |
when user hits the load preset button
Definition at line 786 of file llfloaterwindlight.cpp.
References LLViewerWindow::alertXmlEditText(), gViewerWindow, newPromptCallback(), and NULL.
Referenced by initCallbacks().
void LLFloaterWindLight::onSavePreset | ( | void * | userData | ) | [static] |
when user hits the save preset button
Definition at line 792 of file llfloaterwindlight.cpp.
References LLViewerWindow::alertXml(), LLControlGroup::getBOOL(), LLView::getChild(), LLComboBox::getSelectedItemLabel(), gSavedSettings, gViewerWindow, LLWLParamManager::instance(), LLWLParamManager::mCurParams, LLWLParamSet::mName, saveAlertCallback(), sDefaultPresets, and sWindLight.
Referenced by initCallbacks().
void LLFloaterWindLight::saveAlertCallback | ( | S32 | option, | |
void * | userdata | |||
) | [static] |
prompts a user when overwriting a preset
Definition at line 819 of file llfloaterwindlight.cpp.
References LLWLParamManager::instance(), LLWLParamManager::mCurParams, LLWLParamSet::mName, LLWLParamManager::savePreset(), and LLWLParamManager::setParamSet().
Referenced by onSavePreset().
void LLFloaterWindLight::onDeletePreset | ( | void * | userData | ) | [static] |
when user hits the save preset button
Definition at line 834 of file llfloaterwindlight.cpp.
References LLViewerWindow::alertXml(), LLSD::asString(), deleteAlertCallback(), LLView::getChild(), LLComboBox::getSelectedValue(), gViewerWindow, and sWindLight.
Referenced by initCallbacks().
void LLFloaterWindLight::deleteAlertCallback | ( | S32 | option, | |
void * | userdata | |||
) | [static] |
prompts a user when overwriting a preset
Definition at line 849 of file llfloaterwindlight.cpp.
References LLViewerWindow::alertXml(), LLSD::asString(), LLView::getChild(), LLComboBox::getCurrentIndex(), LLComboBox::getItemCount(), LLComboBox::getSelectedValue(), gViewerWindow, LLWLParamManager::instance(), LLFloaterDayCycle::instance(), LLFloaterDayCycle::isOpen(), NULL, LLComboBox::remove(), LLWLParamManager::removeParamSet(), S32, sDefaultPresets, LLComboBox::setCurrentByIndex(), and sWindLight.
Referenced by onDeletePreset().
void LLFloaterWindLight::onChangePresetName | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
what to do when you change the preset name
Definition at line 906 of file llfloaterwindlight.cpp.
References LLSD::asString(), deactivateAnimator(), LLComboBox::getSelectedValue(), LLComboBox::getSimple(), LLWLParamManager::instance(), LLWLParamManager::loadPreset(), sWindLight, and syncMenu().
Referenced by initCallbacks().
void LLFloaterWindLight::onOpenDayCycle | ( | void * | userData | ) | [static] |
when user hits the save preset button
Definition at line 922 of file llfloaterwindlight.cpp.
References LLFloaterDayCycle::show().
Referenced by initCallbacks().
void LLFloaterWindLight::onCloudScrollXMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
handle cloud scrolling
Definition at line 928 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), LLWLParamManager::mCurParams, and LLWLParamSet::setCloudScrollX().
Referenced by initCallbacks().
void LLFloaterWindLight::onCloudScrollYMoved | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 937 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLSliderCtrl::getValueF32(), LLWLParamManager::instance(), LLWLParamManager::mCurParams, and LLWLParamSet::setCloudScrollY().
Referenced by initCallbacks().
void LLFloaterWindLight::onCloudScrollXToggled | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 947 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLCheckBoxCtrl::get(), LLView::getChild(), LLWLParamManager::instance(), LLWLParamManager::mCurParams, LLWLParamSet::setEnableCloudScrollX(), LLSliderCtrl::setEnabled(), and sWindLight.
Referenced by initCallbacks().
void LLFloaterWindLight::onCloudScrollYToggled | ( | LLUICtrl * | ctrl, | |
void * | userData | |||
) | [static] |
Definition at line 970 of file llfloaterwindlight.cpp.
References deactivateAnimator(), LLCheckBoxCtrl::get(), LLView::getChild(), LLWLParamManager::instance(), LLWLParamManager::mCurParams, LLWLParamSet::setEnableCloudScrollY(), LLSliderCtrl::setEnabled(), and sWindLight.
Referenced by initCallbacks().
void LLFloaterWindLight::show | ( | ) | [static] |
show off our menu
Definition at line 456 of file llfloaterwindlight.cpp.
References instance(), LLFloater::open(), and syncMenu().
Referenced by LLPanelEstateInfo::onClickEditSky(), and LLFloaterEnvSettings::onOpenAdvancedSky().
bool LLFloaterWindLight::isOpen | ( | void | ) | [static] |
return if the menu exists or not
Definition at line 468 of file llfloaterwindlight.cpp.
References NULL, and sWindLight.
Referenced by LLFloaterEnvSettings::onUseEstateTime(), and LLWLParamManager::update().
void LLFloaterWindLight::onClose | ( | bool | app_quitting | ) | [virtual] |
stuff to do on exit
Reimplemented from LLFloater.
Definition at line 477 of file llfloaterwindlight.cpp.
References FALSE, LLFloater::setVisible(), and sWindLight.
void LLFloaterWindLight::syncMenu | ( | ) |
sync up sliders with parameters
Definition at line 312 of file llfloaterwindlight.cpp.
References WLColorControl::b, LLPanel::childDisable(), LLPanel::childEnable(), LLPanel::childSetValue(), F_TWO_PI, WLColorControl::g, LLControlGroup::getBOOL(), LLWLParamSet::getCloudScrollX(), LLWLParamSet::getCloudScrollY(), LLWLParamSet::getEnableCloudScrollX(), LLWLParamSet::getEnableCloudScrollY(), LLWLParamSet::getFloat(), LLWLParamSet::getStarBrightness(), LLWLParamSet::getVector(), gSavedSettings, LLWLParamManager::instance(), LLWLParamManager::mAmbient, LLWLParamManager::mBlueDensity, LLWLParamManager::mBlueHorizon, LLWLParamManager::mCloudColor, LLWLParamManager::mCloudCoverage, LLWLParamManager::mCloudDetail, LLWLParamManager::mCloudMain, LLWLParamManager::mCloudScale, LLWLParamManager::mCurParams, LLWLParamManager::mDensityMult, LLWLParamManager::mDistanceMult, LLWLParamManager::mGlow, LLWLParamManager::mHazeDensity, LLWLParamManager::mHazeHorizon, LLWLParamManager::mMaxAlt, LLWLParamManager::mSunlight, WLFloatControl::mult, LLWLParamManager::mWLGamma, WLFloatControl::name, WLColorControl::name, WLColorControl::r, WL_SUN_AMBIENT_SLIDER_SCALE, and WLFloatControl::x.
Referenced by onChangePresetName(), show(), and LLWLParamManager::update().
void LLFloaterWindLight::deactivateAnimator | ( | ) | [static] |
turn off animated skies
Definition at line 991 of file llfloaterwindlight.cpp.
References LLWLParamManager::instance(), LLWLParamManager::mAnimator, LLWLAnimator::mIsRunning, and LLWLAnimator::mUseLindenTime.
Referenced by onBoolToggle(), onChangePresetName(), onCloudScrollXMoved(), onCloudScrollXToggled(), onCloudScrollYMoved(), onCloudScrollYToggled(), onColorControlBMoved(), onColorControlGMoved(), onColorControlIMoved(), onColorControlRMoved(), onFloatControlMoved(), onFloatTweakMoved(), onGlowBMoved(), onGlowRMoved(), onStarAlphaMoved(), and onSunMoved().
LLFloaterWindLight * LLFloaterWindLight::sWindLight = NULL [static, private] |
Definition at line 136 of file llfloaterwindlight.h.
Referenced by deleteAlertCallback(), instance(), isOpen(), newPromptCallback(), onChangePresetName(), onClose(), onCloudScrollXToggled(), onCloudScrollYToggled(), onColorControlBMoved(), onColorControlGMoved(), onColorControlIMoved(), onColorControlRMoved(), onDeletePreset(), onSavePreset(), and onSunMoved().
std::set< std::string > LLFloaterWindLight::sDefaultPresets [static, private] |
Definition at line 138 of file llfloaterwindlight.h.
Referenced by deleteAlertCallback(), LLFloaterWindLight(), and onSavePreset().