summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterenvsettings.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-01 17:45:04 +0000
commit941cb9f4124c9ccfd5c845bc94639fa46df12c3d (patch)
treee0f525e7bd6cc76d89b2df69c6f1554d191561e8 /indra/newview/llfloaterenvsettings.cpp
parentecec626dec93524f7ef5831a5ba344d6449b99bc (diff)
merge release@83343 skinning-1-merge@83714 -> release
QAR-424
Diffstat (limited to 'indra/newview/llfloaterenvsettings.cpp')
-rw-r--r--indra/newview/llfloaterenvsettings.cpp33
1 files changed, 10 insertions, 23 deletions
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<LLSliderCtrl>("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<LLTextBox>("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<LLSliderCtrl>("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<LLSliderCtrl>("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<LLSliderCtrl>("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<LLComboBox>("WLPresetsCombo");
box->selectByValue("");
}