diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-04-01 17:45:04 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-04-01 17:45:04 +0000 |
commit | 941cb9f4124c9ccfd5c845bc94639fa46df12c3d (patch) | |
tree | e0f525e7bd6cc76d89b2df69c6f1554d191561e8 /indra/newview/llfloaterpostprocess.cpp | |
parent | ecec626dec93524f7ef5831a5ba344d6449b99bc (diff) |
merge release@83343 skinning-1-merge@83714 -> release
QAR-424
Diffstat (limited to 'indra/newview/llfloaterpostprocess.cpp')
-rw-r--r-- | indra/newview/llfloaterpostprocess.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index 33704fc720..5c42f1222f 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -35,7 +35,7 @@ #include "llsliderctrl.h" #include "llcheckboxctrl.h" -#include "llvieweruictrlfactory.h" +#include "lluictrlfactory.h" #include "llviewerdisplay.h" #include "llpostprocess.h" #include "llcombobox.h" @@ -48,7 +48,7 @@ LLFloaterPostProcess* LLFloaterPostProcess::sPostProcess = NULL; LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater("Post-Process Floater") { - gUICtrlFactory->buildFloater(this, "floater_post_process.xml"); + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_post_process.xml"); /// Color Filter Callbacks childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter"); @@ -75,11 +75,11 @@ LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater("Post-Process Floater") childSetCommitCallback("BloomStrength", &LLFloaterPostProcess::onFloatControlMoved, (char*)"bloom_strength"); // Effect loading and saving. - LLComboBox* comboBox = LLUICtrlFactory::getComboBoxByName(this, "PPEffectsCombo"); + LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo"); childSetAction("PPLoadEffect", &LLFloaterPostProcess::onLoadEffect, comboBox); comboBox->setCommitCallback(onChangeEffectName); - LLLineEditor* editBox = LLUICtrlFactory::getLineEditorByName(this, "PPEffectNameEditor"); + LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor"); childSetAction("PPSaveEffect", &LLFloaterPostProcess::onSaveEffect, editBox); syncMenu(); @@ -186,8 +186,7 @@ void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl, void * userData) { // get the combo box and name LLComboBox * comboBox = static_cast<LLComboBox*>(ctrl); - LLLineEditor* editBox = LLUICtrlFactory::getLineEditorByName(sPostProcess, - "PPEffectNameEditor"); + LLLineEditor* editBox = sPostProcess->getChild<LLLineEditor>("PPEffectNameEditor"); // set the parameter's new name editBox->setValue(comboBox->getSelectedValue()); @@ -231,23 +230,21 @@ void LLFloaterPostProcess::onClose(bool app_quitting) void LLFloaterPostProcess::syncMenu() { // add the combo boxe contents - LLComboBox* comboBox = LLUICtrlFactory::getComboBoxByName(this, "PPEffectsCombo"); + LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo"); - if(comboBox != NULL) { - comboBox->removeall(); - - LLSD::map_const_iterator currEffect; - for(currEffect = gPostProcess->mAllEffects.beginMap(); - currEffect != gPostProcess->mAllEffects.endMap(); - ++currEffect) - { - comboBox->add(currEffect->first); - } - - // set the current effect as selected. - comboBox->selectByValue(gPostProcess->getSelectedEffect()); + comboBox->removeall(); + + LLSD::map_const_iterator currEffect; + for(currEffect = gPostProcess->mAllEffects.beginMap(); + currEffect != gPostProcess->mAllEffects.endMap(); + ++currEffect) + { + comboBox->add(currEffect->first); } + // set the current effect as selected. + comboBox->selectByValue(gPostProcess->getSelectedEffect()); + /// Sync Color Filter Menu childSetValue("ColorFilterToggle", gPostProcess->tweaks.useColorFilter()); //childSetValue("ColorFilterGamma", gPostProcess->tweaks.gamma()); |