diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-06-21 08:04:56 +0000 |
commit | 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 (patch) | |
tree | 4a505c1e0919af52800b3ffb3eaf135e7d6f9ce6 /indra/newview/llfloaterpostprocess.cpp | |
parent | 351ebe9fcb76f3b99c2957004bb8493a904869ee (diff) |
merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3
ignore-dead-branch
Diffstat (limited to 'indra/newview/llfloaterpostprocess.cpp')
-rw-r--r-- | indra/newview/llfloaterpostprocess.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index de9b598b1e..a1015918d4 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -47,10 +47,20 @@ LLFloaterPostProcess* LLFloaterPostProcess::sPostProcess = NULL; -LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater(std::string("Post-Process Floater")) +LLFloaterPostProcess::LLFloaterPostProcess() + : LLFloater() { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_post_process.xml"); +} + +LLFloaterPostProcess::~LLFloaterPostProcess() +{ + + +} +BOOL LLFloaterPostProcess::postBuild() +{ /// Color Filter Callbacks childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter"); //childSetCommitCallback("ColorFilterGamma", &LLFloaterPostProcess::onFloatControlMoved, &(gPostProcess->tweaks.gamma())); @@ -78,19 +88,13 @@ LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater(std::string("Post-Proce // Effect loading and saving. LLComboBox* comboBox = getChild<LLComboBox>("PPEffectsCombo"); childSetAction("PPLoadEffect", &LLFloaterPostProcess::onLoadEffect, comboBox); - comboBox->setCommitCallback(onChangeEffectName); + comboBox->setCommitCallback(boost::bind(&LLFloaterPostProcess::onChangeEffectName, this, _1)); LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor"); childSetAction("PPSaveEffect", &LLFloaterPostProcess::onSaveEffect, editBox); syncMenu(); - -} - -LLFloaterPostProcess::~LLFloaterPostProcess() -{ - - + return TRUE; } LLFloaterPostProcess* LLFloaterPostProcess::instance() @@ -99,7 +103,7 @@ LLFloaterPostProcess* LLFloaterPostProcess::instance() if (!sPostProcess) { sPostProcess = new LLFloaterPostProcess(); - sPostProcess->open(); + sPostProcess->openFloater(); sPostProcess->setFocus(TRUE); } return sPostProcess; @@ -185,14 +189,13 @@ void LLFloaterPostProcess::onSaveEffect(void* userData) } } -void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl, void * userData) +void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl) { // get the combo box and name - LLComboBox * comboBox = static_cast<LLComboBox*>(ctrl); - LLLineEditor* editBox = sPostProcess->getChild<LLLineEditor>("PPEffectNameEditor"); + LLLineEditor* editBox = getChild<LLLineEditor>("PPEffectNameEditor"); // set the parameter's new name - editBox->setValue(comboBox->getSelectedValue()); + editBox->setValue(ctrl->getValue()); } bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response) @@ -215,7 +218,7 @@ void LLFloaterPostProcess::show() // and open the menu LLFloaterPostProcess* postProcess = instance(); postProcess->syncMenu(); - postProcess->open(); + postProcess->openFloater(); } // virtual |