From 941cb9f4124c9ccfd5c845bc94639fa46df12c3d Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 1 Apr 2008 17:45:04 +0000 Subject: merge release@83343 skinning-1-merge@83714 -> release QAR-424 --- indra/newview/llfloaterenvsettings.cpp | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) (limited to 'indra/newview/llfloaterenvsettings.cpp') diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp index 197e2ba15e..8570515f07 100644 --- a/indra/newview/llfloaterenvsettings.cpp +++ b/indra/newview/llfloaterenvsettings.cpp @@ -35,7 +35,7 @@ #include "llfloaterwindlight.h" #include "llfloaterwater.h" -#include "llvieweruictrlfactory.h" +#include "lluictrlfactory.h" #include "llsliderctrl.h" #include "llcombobox.h" #include "llcolorswatch.h" @@ -55,7 +55,7 @@ LLFloaterEnvSettings* LLFloaterEnvSettings::sEnvSettings = NULL; LLFloaterEnvSettings::LLFloaterEnvSettings() : LLFloater("Environment Settings Floater") { - gUICtrlFactory->buildFloater(this, "floater_env_settings.xml"); + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_env_settings.xml"); // load it up initCallbacks(); @@ -106,24 +106,14 @@ void LLFloaterEnvSettings::initCallbacks(void) void LLFloaterEnvSettings::syncMenu() { LLSliderCtrl* sldr; - sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, - "EnvTimeSlider"); - if(NULL == sldr) - { - return; - } + sldr = sEnvSettings->getChild("EnvTimeSlider"); // sync the clock F32 val = (F32)LLWLParamManager::instance()->mAnimator.getDayTime(); LLString timeStr = timeToString(val); LLTextBox* textBox; - textBox = LLUICtrlFactory::getTextBoxByName(sEnvSettings, - "EnvTimeText"); - if(NULL == textBox) - { - return; - } + textBox = sEnvSettings->getChild("EnvTimeText"); textBox->setValue(timeStr); @@ -204,7 +194,7 @@ void LLFloaterEnvSettings::show() envSettings->syncMenu(); // comment in if you want the menu to rebuild each time - //gUICtrlFactory->buildFloater(envSettings, "floater_env_settings.xml"); + //LLUICtrlFactory::getInstance()->buildFloater(envSettings, "floater_env_settings.xml"); //envSettings->initCallbacks(); envSettings->open(); @@ -232,8 +222,7 @@ void LLFloaterEnvSettings::onClose(bool app_quitting) void LLFloaterEnvSettings::onChangeDayTime(LLUICtrl* ctrl, void* userData) { LLSliderCtrl* sldr; - sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, - "EnvTimeSlider"); + sldr = sEnvSettings->getChild("EnvTimeSlider"); // deactivate animator LLWLParamManager::instance()->mAnimator.mIsRunning = false; @@ -253,8 +242,7 @@ void LLFloaterEnvSettings::onChangeDayTime(LLUICtrl* ctrl, void* userData) void LLFloaterEnvSettings::onChangeCloudCoverage(LLUICtrl* ctrl, void* userData) { LLSliderCtrl* sldr; - sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, - "EnvCloudSlider"); + sldr = sEnvSettings->getChild("EnvCloudSlider"); // deactivate animator //LLWLParamManager::instance()->mAnimator.mIsRunning = false; @@ -267,10 +255,9 @@ void LLFloaterEnvSettings::onChangeCloudCoverage(LLUICtrl* ctrl, void* userData) void LLFloaterEnvSettings::onChangeWaterFogDensity(LLUICtrl* ctrl, void* userData) { LLSliderCtrl* sldr; - sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, - "EnvWaterFogSlider"); + sldr = sEnvSettings->getChild("EnvWaterFogSlider"); - if(NULL == sldr || NULL == userData) + if(NULL == userData) { return; } @@ -313,7 +300,7 @@ void LLFloaterEnvSettings::onUseEstateTime(void* userData) { // select the blank value in LLFloaterWindLight* wl = LLFloaterWindLight::instance(); - LLComboBox* box = LLUICtrlFactory::getComboBoxByName(wl, "WLPresetsCombo"); + LLComboBox* box = wl->getChild("WLPresetsCombo"); box->selectByValue(""); } -- cgit v1.2.3