diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterwindlight.cpp | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/linden/indra/newview/llfloaterwindlight.cpp b/linden/indra/newview/llfloaterwindlight.cpp index 2321f5d..26e2184 100644 --- a/linden/indra/newview/llfloaterwindlight.cpp +++ b/linden/indra/newview/llfloaterwindlight.cpp | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "llmultisliderctrl.h" | 41 | #include "llmultisliderctrl.h" |
42 | #include "llspinctrl.h" | 42 | #include "llspinctrl.h" |
43 | #include "llcheckboxctrl.h" | 43 | #include "llcheckboxctrl.h" |
44 | #include "llvieweruictrlfactory.h" | 44 | #include "lluictrlfactory.h" |
45 | #include "llviewercamera.h" | 45 | #include "llviewercamera.h" |
46 | #include "llcombobox.h" | 46 | #include "llcombobox.h" |
47 | #include "lllineeditor.h" | 47 | #include "lllineeditor.h" |
@@ -68,10 +68,10 @@ static const F32 WL_SUN_AMBIENT_SLIDER_SCALE = 3.0f; | |||
68 | 68 | ||
69 | LLFloaterWindLight::LLFloaterWindLight() : LLFloater("windlight floater") | 69 | LLFloaterWindLight::LLFloaterWindLight() : LLFloater("windlight floater") |
70 | { | 70 | { |
71 | gUICtrlFactory->buildFloater(this, "floater_windlight_options.xml"); | 71 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_windlight_options.xml"); |
72 | 72 | ||
73 | // add the combo boxes | 73 | // add the combo boxes |
74 | LLComboBox* comboBox = LLUICtrlFactory::getComboBoxByName(this, "WLPresetsCombo"); | 74 | LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo"); |
75 | 75 | ||
76 | if(comboBox != NULL) { | 76 | if(comboBox != NULL) { |
77 | 77 | ||
@@ -214,7 +214,7 @@ void LLFloaterWindLight::initCallbacks(void) { | |||
214 | // WL Top | 214 | // WL Top |
215 | childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL); | 215 | childSetAction("WLDayCycleMenuButton", onOpenDayCycle, NULL); |
216 | // Load/save | 216 | // Load/save |
217 | LLComboBox* comboBox = LLUICtrlFactory::getComboBoxByName(this, "WLPresetsCombo"); | 217 | LLComboBox* comboBox = getChild<LLComboBox>("WLPresetsCombo"); |
218 | 218 | ||
219 | //childSetAction("WLLoadPreset", onLoadPreset, comboBox); | 219 | //childSetAction("WLLoadPreset", onLoadPreset, comboBox); |
220 | childSetAction("WLNewPreset", onNewPreset, comboBox); | 220 | childSetAction("WLNewPreset", onNewPreset, comboBox); |
@@ -259,7 +259,7 @@ void LLFloaterWindLight::newPromptCallback(S32 option, const LLString& text, voi | |||
259 | } | 259 | } |
260 | 260 | ||
261 | if(option == 0) { | 261 | if(option == 0) { |
262 | LLComboBox* comboBox = LLUICtrlFactory::getComboBoxByName(sWindLight, | 262 | LLComboBox* comboBox = sWindLight->getChild<LLComboBox>( |
263 | "WLPresetsCombo"); | 263 | "WLPresetsCombo"); |
264 | 264 | ||
265 | LLFloaterDayCycle* sDayCycle = NULL; | 265 | LLFloaterDayCycle* sDayCycle = NULL; |
@@ -267,7 +267,7 @@ void LLFloaterWindLight::newPromptCallback(S32 option, const LLString& text, voi | |||
267 | if(LLFloaterDayCycle::isOpen()) | 267 | if(LLFloaterDayCycle::isOpen()) |
268 | { | 268 | { |
269 | sDayCycle = LLFloaterDayCycle::instance(); | 269 | sDayCycle = LLFloaterDayCycle::instance(); |
270 | keyCombo = LLUICtrlFactory::getComboBoxByName(sDayCycle, | 270 | keyCombo = sDayCycle->getChild<LLComboBox>( |
271 | "WLKeyPresets"); | 271 | "WLKeyPresets"); |
272 | } | 272 | } |
273 | 273 | ||
@@ -459,7 +459,7 @@ void LLFloaterWindLight::show() | |||
459 | windLight->syncMenu(); | 459 | windLight->syncMenu(); |
460 | 460 | ||
461 | // comment in if you want the menu to rebuild each time | 461 | // comment in if you want the menu to rebuild each time |
462 | //gUICtrlFactory->buildFloater(windLight, "floater_windlight_options.xml"); | 462 | //LLUICtrlFactory::getInstance()->buildFloater(windLight, "floater_windlight_options.xml"); |
463 | //windLight->initCallbacks(); | 463 | //windLight->initCallbacks(); |
464 | 464 | ||
465 | windLight->open(); | 465 | windLight->open(); |
@@ -740,10 +740,8 @@ void LLFloaterWindLight::onSunMoved(LLUICtrl* ctrl, void* userData) | |||
740 | { | 740 | { |
741 | deactivateAnimator(); | 741 | deactivateAnimator(); |
742 | 742 | ||
743 | LLSliderCtrl* sunSldr = LLUICtrlFactory::getSliderByName(sWindLight, | 743 | LLSliderCtrl* sunSldr = sWindLight->getChild<LLSliderCtrl>("WLSunAngle"); |
744 | "WLSunAngle"); | 744 | LLSliderCtrl* eastSldr = sWindLight->getChild<LLSliderCtrl>("WLEastAngle"); |
745 | LLSliderCtrl* eastSldr = LLUICtrlFactory::getSliderByName(sWindLight, | ||
746 | "WLEastAngle"); | ||
747 | 745 | ||
748 | WLColorControl * colorControl = static_cast<WLColorControl *>(userData); | 746 | WLColorControl * colorControl = static_cast<WLColorControl *>(userData); |
749 | 747 | ||
@@ -794,7 +792,7 @@ void LLFloaterWindLight::onNewPreset(void* userData) | |||
794 | void LLFloaterWindLight::onSavePreset(void* userData) | 792 | void LLFloaterWindLight::onSavePreset(void* userData) |
795 | { | 793 | { |
796 | // get the name | 794 | // get the name |
797 | LLComboBox* comboBox = LLUICtrlFactory::getComboBoxByName(sWindLight, | 795 | LLComboBox* comboBox = sWindLight->getChild<LLComboBox>( |
798 | "WLPresetsCombo"); | 796 | "WLPresetsCombo"); |
799 | 797 | ||
800 | // don't save the empty name | 798 | // don't save the empty name |
@@ -835,7 +833,7 @@ void LLFloaterWindLight::saveAlertCallback(S32 option, void* userdata) | |||
835 | 833 | ||
836 | void LLFloaterWindLight::onDeletePreset(void* userData) | 834 | void LLFloaterWindLight::onDeletePreset(void* userData) |
837 | { | 835 | { |
838 | LLComboBox* combo_box = LLUICtrlFactory::getComboBoxByName(sWindLight, | 836 | LLComboBox* combo_box = sWindLight->getChild<LLComboBox>( |
839 | "WLPresetsCombo"); | 837 | "WLPresetsCombo"); |
840 | 838 | ||
841 | if(combo_box->getSelectedValue().asString() == "") | 839 | if(combo_box->getSelectedValue().asString() == "") |
@@ -853,7 +851,7 @@ void LLFloaterWindLight::deleteAlertCallback(S32 option, void* userdata) | |||
853 | // if they choose delete, do it. Otherwise, don't do anything | 851 | // if they choose delete, do it. Otherwise, don't do anything |
854 | if(option == 0) | 852 | if(option == 0) |
855 | { | 853 | { |
856 | LLComboBox* combo_box = LLUICtrlFactory::getComboBoxByName(sWindLight, | 854 | LLComboBox* combo_box = sWindLight->getChild<LLComboBox>( |
857 | "WLPresetsCombo"); | 855 | "WLPresetsCombo"); |
858 | LLFloaterDayCycle* day_cycle = NULL; | 856 | LLFloaterDayCycle* day_cycle = NULL; |
859 | LLComboBox* key_combo = NULL; | 857 | LLComboBox* key_combo = NULL; |
@@ -862,10 +860,9 @@ void LLFloaterWindLight::deleteAlertCallback(S32 option, void* userdata) | |||
862 | if(LLFloaterDayCycle::isOpen()) | 860 | if(LLFloaterDayCycle::isOpen()) |
863 | { | 861 | { |
864 | day_cycle = LLFloaterDayCycle::instance(); | 862 | day_cycle = LLFloaterDayCycle::instance(); |
865 | key_combo = LLUICtrlFactory::getComboBoxByName(day_cycle, | 863 | key_combo = day_cycle->getChild<LLComboBox>( |
866 | "WLKeyPresets"); | 864 | "WLKeyPresets"); |
867 | mult_sldr = LLUICtrlFactory::getMultiSliderByName(day_cycle, | 865 | mult_sldr = day_cycle->getChild<LLMultiSliderCtrl>("WLDayCycleKeys"); |
868 | "WLDayCycleKeys"); | ||
869 | } | 866 | } |
870 | 867 | ||
871 | LLString name(combo_box->getSelectedValue().asString()); | 868 | LLString name(combo_box->getSelectedValue().asString()); |
@@ -956,7 +953,7 @@ void LLFloaterWindLight::onCloudScrollXToggled(LLUICtrl* ctrl, void* userData) | |||
956 | bool lock = cbCtrl->get(); | 953 | bool lock = cbCtrl->get(); |
957 | LLWLParamManager::instance()->mCurParams.setEnableCloudScrollX(!lock); | 954 | LLWLParamManager::instance()->mCurParams.setEnableCloudScrollX(!lock); |
958 | 955 | ||
959 | LLSliderCtrl* sldr = LLUICtrlFactory::getSliderByName(sWindLight, | 956 | LLSliderCtrl* sldr = sWindLight->getChild<LLSliderCtrl>( |
960 | "WLCloudScrollX"); | 957 | "WLCloudScrollX"); |
961 | 958 | ||
962 | if(cbCtrl->get()) | 959 | if(cbCtrl->get()) |
@@ -978,7 +975,7 @@ void LLFloaterWindLight::onCloudScrollYToggled(LLUICtrl* ctrl, void* userData) | |||
978 | bool lock = cbCtrl->get(); | 975 | bool lock = cbCtrl->get(); |
979 | LLWLParamManager::instance()->mCurParams.setEnableCloudScrollY(!lock); | 976 | LLWLParamManager::instance()->mCurParams.setEnableCloudScrollY(!lock); |
980 | 977 | ||
981 | LLSliderCtrl* sldr = LLUICtrlFactory::getSliderByName(sWindLight, | 978 | LLSliderCtrl* sldr = sWindLight->getChild<LLSliderCtrl>( |
982 | "WLCloudScrollY"); | 979 | "WLCloudScrollY"); |
983 | 980 | ||
984 | if(cbCtrl->get()) | 981 | if(cbCtrl->get()) |