diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterenvsettings.cpp | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/linden/indra/newview/llfloaterenvsettings.cpp b/linden/indra/newview/llfloaterenvsettings.cpp index 6a0400c..b16b48d 100644 --- a/linden/indra/newview/llfloaterenvsettings.cpp +++ b/linden/indra/newview/llfloaterenvsettings.cpp | |||
@@ -35,7 +35,7 @@ | |||
35 | 35 | ||
36 | #include "llfloaterwindlight.h" | 36 | #include "llfloaterwindlight.h" |
37 | #include "llfloaterwater.h" | 37 | #include "llfloaterwater.h" |
38 | #include "llvieweruictrlfactory.h" | 38 | #include "lluictrlfactory.h" |
39 | #include "llsliderctrl.h" | 39 | #include "llsliderctrl.h" |
40 | #include "llcombobox.h" | 40 | #include "llcombobox.h" |
41 | #include "llcolorswatch.h" | 41 | #include "llcolorswatch.h" |
@@ -55,7 +55,7 @@ LLFloaterEnvSettings* LLFloaterEnvSettings::sEnvSettings = NULL; | |||
55 | 55 | ||
56 | LLFloaterEnvSettings::LLFloaterEnvSettings() : LLFloater("Environment Settings Floater") | 56 | LLFloaterEnvSettings::LLFloaterEnvSettings() : LLFloater("Environment Settings Floater") |
57 | { | 57 | { |
58 | gUICtrlFactory->buildFloater(this, "floater_env_settings.xml"); | 58 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_env_settings.xml"); |
59 | 59 | ||
60 | // load it up | 60 | // load it up |
61 | initCallbacks(); | 61 | initCallbacks(); |
@@ -106,24 +106,14 @@ void LLFloaterEnvSettings::initCallbacks(void) | |||
106 | void LLFloaterEnvSettings::syncMenu() | 106 | void LLFloaterEnvSettings::syncMenu() |
107 | { | 107 | { |
108 | LLSliderCtrl* sldr; | 108 | LLSliderCtrl* sldr; |
109 | sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, | 109 | sldr = sEnvSettings->getChild<LLSliderCtrl>("EnvTimeSlider"); |
110 | "EnvTimeSlider"); | ||
111 | if(NULL == sldr) | ||
112 | { | ||
113 | return; | ||
114 | } | ||
115 | 110 | ||
116 | // sync the clock | 111 | // sync the clock |
117 | F32 val = (F32)LLWLParamManager::instance()->mAnimator.getDayTime(); | 112 | F32 val = (F32)LLWLParamManager::instance()->mAnimator.getDayTime(); |
118 | LLString timeStr = timeToString(val); | 113 | LLString timeStr = timeToString(val); |
119 | 114 | ||
120 | LLTextBox* textBox; | 115 | LLTextBox* textBox; |
121 | textBox = LLUICtrlFactory::getTextBoxByName(sEnvSettings, | 116 | textBox = sEnvSettings->getChild<LLTextBox>("EnvTimeText"); |
122 | "EnvTimeText"); | ||
123 | if(NULL == textBox) | ||
124 | { | ||
125 | return; | ||
126 | } | ||
127 | 117 | ||
128 | textBox->setValue(timeStr); | 118 | textBox->setValue(timeStr); |
129 | 119 | ||
@@ -204,7 +194,7 @@ void LLFloaterEnvSettings::show() | |||
204 | envSettings->syncMenu(); | 194 | envSettings->syncMenu(); |
205 | 195 | ||
206 | // comment in if you want the menu to rebuild each time | 196 | // comment in if you want the menu to rebuild each time |
207 | //gUICtrlFactory->buildFloater(envSettings, "floater_env_settings.xml"); | 197 | //LLUICtrlFactory::getInstance()->buildFloater(envSettings, "floater_env_settings.xml"); |
208 | //envSettings->initCallbacks(); | 198 | //envSettings->initCallbacks(); |
209 | 199 | ||
210 | envSettings->open(); | 200 | envSettings->open(); |
@@ -232,8 +222,7 @@ void LLFloaterEnvSettings::onClose(bool app_quitting) | |||
232 | void LLFloaterEnvSettings::onChangeDayTime(LLUICtrl* ctrl, void* userData) | 222 | void LLFloaterEnvSettings::onChangeDayTime(LLUICtrl* ctrl, void* userData) |
233 | { | 223 | { |
234 | LLSliderCtrl* sldr; | 224 | LLSliderCtrl* sldr; |
235 | sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, | 225 | sldr = sEnvSettings->getChild<LLSliderCtrl>("EnvTimeSlider"); |
236 | "EnvTimeSlider"); | ||
237 | 226 | ||
238 | // deactivate animator | 227 | // deactivate animator |
239 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; | 228 | LLWLParamManager::instance()->mAnimator.mIsRunning = false; |
@@ -253,8 +242,7 @@ void LLFloaterEnvSettings::onChangeDayTime(LLUICtrl* ctrl, void* userData) | |||
253 | void LLFloaterEnvSettings::onChangeCloudCoverage(LLUICtrl* ctrl, void* userData) | 242 | void LLFloaterEnvSettings::onChangeCloudCoverage(LLUICtrl* ctrl, void* userData) |
254 | { | 243 | { |
255 | LLSliderCtrl* sldr; | 244 | LLSliderCtrl* sldr; |
256 | sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, | 245 | sldr = sEnvSettings->getChild<LLSliderCtrl>("EnvCloudSlider"); |
257 | "EnvCloudSlider"); | ||
258 | 246 | ||
259 | // deactivate animator | 247 | // deactivate animator |
260 | //LLWLParamManager::instance()->mAnimator.mIsRunning = false; | 248 | //LLWLParamManager::instance()->mAnimator.mIsRunning = false; |
@@ -267,10 +255,9 @@ void LLFloaterEnvSettings::onChangeCloudCoverage(LLUICtrl* ctrl, void* userData) | |||
267 | void LLFloaterEnvSettings::onChangeWaterFogDensity(LLUICtrl* ctrl, void* userData) | 255 | void LLFloaterEnvSettings::onChangeWaterFogDensity(LLUICtrl* ctrl, void* userData) |
268 | { | 256 | { |
269 | LLSliderCtrl* sldr; | 257 | LLSliderCtrl* sldr; |
270 | sldr = LLUICtrlFactory::getSliderByName(sEnvSettings, | 258 | sldr = sEnvSettings->getChild<LLSliderCtrl>("EnvWaterFogSlider"); |
271 | "EnvWaterFogSlider"); | ||
272 | 259 | ||
273 | if(NULL == sldr || NULL == userData) | 260 | if(NULL == userData) |
274 | { | 261 | { |
275 | return; | 262 | return; |
276 | } | 263 | } |
@@ -313,7 +300,7 @@ void LLFloaterEnvSettings::onUseEstateTime(void* userData) | |||
313 | { | 300 | { |
314 | // select the blank value in | 301 | // select the blank value in |
315 | LLFloaterWindLight* wl = LLFloaterWindLight::instance(); | 302 | LLFloaterWindLight* wl = LLFloaterWindLight::instance(); |
316 | LLComboBox* box = LLUICtrlFactory::getComboBoxByName(wl, "WLPresetsCombo"); | 303 | LLComboBox* box = wl->getChild<LLComboBox>("WLPresetsCombo"); |
317 | box->selectByValue(""); | 304 | box->selectByValue(""); |
318 | } | 305 | } |
319 | 306 | ||