From 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 08:04:56 +0000 Subject: merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3 ignore-dead-branch --- indra/newview/llfloatersettingsdebug.cpp | 91 +++++++++----------------------- 1 file changed, 25 insertions(+), 66 deletions(-) (limited to 'indra/newview/llfloatersettingsdebug.cpp') diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 2677467611..339b90a0f5 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -40,16 +40,15 @@ #include "llcolorswatch.h" #include "llviewercontrol.h" -LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; -LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater(std::string("Configuration Editor")) +LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) +: LLFloater(key) { + LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml"); } LLFloaterSettingsDebug::~LLFloaterSettingsDebug() -{ - sInstance = NULL; -} +{} BOOL LLFloaterSettingsDebug::postBuild() { @@ -68,29 +67,31 @@ BOOL LLFloaterSettingsDebug::postBuild() } } func(settings_combo); - gSavedSettings.applyToAll(&func); - gSavedPerAccountSettings.applyToAll(&func); - gColors.applyToAll(&func); + std::string key = getKey().asString(); + if (key == "all" || key == "base") + { + gSavedSettings.applyToAll(&func); + } + if (key == "all" || key == "account") + { + gSavedPerAccountSettings.applyToAll(&func); + } + if (key == "all" || key == "skin") + { + gSavedSkinSettings.applyToAll(&func); + } settings_combo->sortByName(); - settings_combo->setCommitCallback(onSettingSelect); - settings_combo->setCallbackUserData(this); + settings_combo->setCommitCallback(onSettingSelect, this); settings_combo->updateSelection(); - childSetCommitCallback("val_spinner_1", onCommitSettings); - childSetUserData("val_spinner_1", this); - childSetCommitCallback("val_spinner_2", onCommitSettings); - childSetUserData("val_spinner_2", this); - childSetCommitCallback("val_spinner_3", onCommitSettings); - childSetUserData("val_spinner_3", this); - childSetCommitCallback("val_spinner_4", onCommitSettings); - childSetUserData("val_spinner_4", this); - childSetCommitCallback("val_text", onCommitSettings); - childSetUserData("val_text", this); - childSetCommitCallback("boolean_combo", onCommitSettings); - childSetUserData("boolean_combo", this); - childSetCommitCallback("color_swatch", onCommitSettings); - childSetUserData("color_swatch", this); + childSetCommitCallback("val_spinner_1", onCommitSettings, this); + childSetCommitCallback("val_spinner_2", onCommitSettings, this); + childSetCommitCallback("val_spinner_3", onCommitSettings, this); + childSetCommitCallback("val_spinner_4", onCommitSettings, this); + childSetCommitCallback("val_text", onCommitSettings, this); + childSetCommitCallback("boolean_combo", onCommitSettings, this); + childSetCommitCallback("color_swatch", onCommitSettings, this); childSetAction("default_btn", onClickDefault, this); mComment = getChild("comment_text"); return TRUE; @@ -105,19 +106,6 @@ void LLFloaterSettingsDebug::draw() LLFloater::draw(); } -//static -void LLFloaterSettingsDebug::show(void*) -{ - if (sInstance == NULL) - { - sInstance = new LLFloaterSettingsDebug(); - - LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_settings_debug.xml"); - } - - sInstance->open(); /* Flawfinder: ignore */ -} - //static void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) { @@ -192,12 +180,6 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) //col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); //controlp->set(col3.getValue()); break; - case TYPE_COL4U: - col3.setValue(floaterp->childGetValue("color_swatch")); - col4U.setVecScaleClamp(col3); - col4U.mV[VALPHA] = floaterp->childGetValue("val_spinner_4").asInteger(); - controlp->set(col4U.getValue()); - break; default: break; } @@ -464,29 +446,6 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) color_swatch->setValue(sd); break; } - case TYPE_COL4U: - { - LLColor4U clr; - clr.setValue(sd); - color_swatch->setVisible(TRUE); - if(LLColor4(clr) != LLColor4(color_swatch->getValue())) - { - color_swatch->set(LLColor4(clr), TRUE, FALSE); - } - spinner4->setVisible(TRUE); - spinner4->setLabel(std::string("Alpha")); - if(!spinner4->hasFocus()) - { - spinner4->setPrecision(0); - spinner4->setValue(clr.mV[VALPHA]); - } - - spinner4->setMinValue(0); - spinner4->setMaxValue(255); - spinner4->setIncrement(1.f); - - break; - } default: mComment->setText(std::string("unknown")); break; -- cgit v1.2.3 From ade6bbb06c6a842f39a3fe32decf7c66682df092 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 17:16:27 +0000 Subject: merge -r 124105-124625 skinning-13 -> viewer-2.0.0-3 --- indra/newview/llfloatersettingsdebug.cpp | 73 ++++++++++++++------------------ 1 file changed, 31 insertions(+), 42 deletions(-) (limited to 'indra/newview/llfloatersettingsdebug.cpp') diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 339b90a0f5..8b6102c67f 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -44,7 +44,11 @@ LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) : LLFloater(key) { - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml"); + //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_settings_debug.xml"); + mCommitCallbackRegistrar.add("SettingSelect", boost::bind(&LLFloaterSettingsDebug::onSettingSelect, this,_1)); + mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsDebug::onCommitSettings, this)); + mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsDebug::onClickDefault, this)); + } LLFloaterSettingsDebug::~LLFloaterSettingsDebug() @@ -82,17 +86,7 @@ BOOL LLFloaterSettingsDebug::postBuild() } settings_combo->sortByName(); - settings_combo->setCommitCallback(onSettingSelect, this); settings_combo->updateSelection(); - - childSetCommitCallback("val_spinner_1", onCommitSettings, this); - childSetCommitCallback("val_spinner_2", onCommitSettings, this); - childSetCommitCallback("val_spinner_3", onCommitSettings, this); - childSetCommitCallback("val_spinner_4", onCommitSettings, this); - childSetCommitCallback("val_text", onCommitSettings, this); - childSetCommitCallback("boolean_combo", onCommitSettings, this); - childSetCommitCallback("color_swatch", onCommitSettings, this); - childSetAction("default_btn", onClickDefault, this); mComment = getChild("comment_text"); return TRUE; } @@ -107,21 +101,17 @@ void LLFloaterSettingsDebug::draw() } //static -void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl, void* user_data) +void LLFloaterSettingsDebug::onSettingSelect(LLUICtrl* ctrl) { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; LLComboBox* combo_box = (LLComboBox*)ctrl; LLControlVariable* controlp = (LLControlVariable*)combo_box->getCurrentUserdata(); - floaterp->updateControl(controlp); + updateControl(controlp); } -//static -void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) +void LLFloaterSettingsDebug::onCommitSettings() { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); + LLComboBox* settings_combo = getChild("settings_combo"); LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); LLVector3 vector; @@ -135,46 +125,46 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) switch(controlp->type()) { case TYPE_U32: - controlp->set(floaterp->childGetValue("val_spinner_1")); + controlp->set(childGetValue("val_spinner_1")); break; case TYPE_S32: - controlp->set(floaterp->childGetValue("val_spinner_1")); + controlp->set(childGetValue("val_spinner_1")); break; case TYPE_F32: - controlp->set(LLSD(floaterp->childGetValue("val_spinner_1").asReal())); + controlp->set(LLSD(childGetValue("val_spinner_1").asReal())); break; case TYPE_BOOLEAN: - controlp->set(floaterp->childGetValue("boolean_combo")); + controlp->set(childGetValue("boolean_combo")); break; case TYPE_STRING: - controlp->set(LLSD(floaterp->childGetValue("val_text").asString())); + controlp->set(LLSD(childGetValue("val_text").asString())); break; case TYPE_VEC3: - vector.mV[VX] = (F32)floaterp->childGetValue("val_spinner_1").asReal(); - vector.mV[VY] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); - vector.mV[VZ] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); + vector.mV[VX] = (F32)childGetValue("val_spinner_1").asReal(); + vector.mV[VY] = (F32)childGetValue("val_spinner_2").asReal(); + vector.mV[VZ] = (F32)childGetValue("val_spinner_3").asReal(); controlp->set(vector.getValue()); break; case TYPE_VEC3D: - vectord.mdV[VX] = floaterp->childGetValue("val_spinner_1").asReal(); - vectord.mdV[VY] = floaterp->childGetValue("val_spinner_2").asReal(); - vectord.mdV[VZ] = floaterp->childGetValue("val_spinner_3").asReal(); + vectord.mdV[VX] = childGetValue("val_spinner_1").asReal(); + vectord.mdV[VY] = childGetValue("val_spinner_2").asReal(); + vectord.mdV[VZ] = childGetValue("val_spinner_3").asReal(); controlp->set(vectord.getValue()); break; case TYPE_RECT: - rect.mLeft = floaterp->childGetValue("val_spinner_1").asInteger(); - rect.mRight = floaterp->childGetValue("val_spinner_2").asInteger(); - rect.mBottom = floaterp->childGetValue("val_spinner_3").asInteger(); - rect.mTop = floaterp->childGetValue("val_spinner_4").asInteger(); + rect.mLeft = childGetValue("val_spinner_1").asInteger(); + rect.mRight = childGetValue("val_spinner_2").asInteger(); + rect.mBottom = childGetValue("val_spinner_3").asInteger(); + rect.mTop = childGetValue("val_spinner_4").asInteger(); controlp->set(rect.getValue()); break; case TYPE_COL4: - col3.setValue(floaterp->childGetValue("color_swatch")); - col4 = LLColor4(col3, (F32)floaterp->childGetValue("val_spinner_4").asReal()); + col3.setValue(childGetValue("val_color_swatch")); + col4 = LLColor4(col3, (F32)childGetValue("val_spinner_4").asReal()); controlp->set(col4.getValue()); break; case TYPE_COL3: - controlp->set(floaterp->childGetValue("color_swatch")); + controlp->set(childGetValue("val_color_swatch")); //col3.mV[VRED] = (F32)floaterp->childGetValue("val_spinner_1").asC(); //col3.mV[VGREEN] = (F32)floaterp->childGetValue("val_spinner_2").asReal(); //col3.mV[VBLUE] = (F32)floaterp->childGetValue("val_spinner_3").asReal(); @@ -186,16 +176,15 @@ void LLFloaterSettingsDebug::onCommitSettings(LLUICtrl* ctrl, void* user_data) } // static -void LLFloaterSettingsDebug::onClickDefault(void* user_data) +void LLFloaterSettingsDebug::onClickDefault() { - LLFloaterSettingsDebug* floaterp = (LLFloaterSettingsDebug*)user_data; - LLComboBox* settings_combo = floaterp->getChild("settings_combo"); + LLComboBox* settings_combo = getChild("settings_combo"); LLControlVariable* controlp = (LLControlVariable*)settings_combo->getCurrentUserdata(); if (controlp) { controlp->resetToDefault(); - floaterp->updateControl(controlp); + updateControl(controlp); } } @@ -206,7 +195,7 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) LLSpinCtrl* spinner2 = getChild("val_spinner_2"); LLSpinCtrl* spinner3 = getChild("val_spinner_3"); LLSpinCtrl* spinner4 = getChild("val_spinner_4"); - LLColorSwatchCtrl* color_swatch = getChild("color_swatch"); + LLColorSwatchCtrl* color_swatch = getChild("val_color_swatch"); if (!spinner1 || !spinner2 || !spinner3 || !spinner4 || !color_swatch) { -- cgit v1.2.3 From d6101558a171dbd2390792ac1e78d09fc2c27711 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 6 Jul 2009 21:58:04 +0000 Subject: Merge xui-army-5 to viewer-2, includes layout, art, and color changes, also UI color refactoring and new FreeType font library on Linux. svn merge -r126038:126164 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/xui-army-5 --- indra/newview/llfloatersettingsdebug.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra/newview/llfloatersettingsdebug.cpp') diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 8b6102c67f..53b40f8b7a 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -80,10 +80,6 @@ BOOL LLFloaterSettingsDebug::postBuild() { gSavedPerAccountSettings.applyToAll(&func); } - if (key == "all" || key == "skin") - { - gSavedSkinSettings.applyToAll(&func); - } settings_combo->sortByName(); settings_combo->updateSelection(); -- cgit v1.2.3 From 138bf1132262c479dbbd5c95195db46b1efd065f Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 24 Aug 2009 20:04:52 +0000 Subject: merge -r 130399-131510 skinning-21 -> viewer-2.0.0-3 DEV-11254 DEV-11254 DEV-2003: DEV-21567 DEV-37301 EXT-104 EXT-138 EXT-217 EXT-256 EXT-259 EXT-259 EXT-328 EXT-348 EXT-386 EXT-399 EXT-403 EXT-460 EXT-492 EXT-492 EXT-531 EXT-537 EXT-684 improved text editor (handles multiple fonts simultaneously as well as inline widgets) --- indra/newview/llfloatersettingsdebug.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloatersettingsdebug.cpp') diff --git a/indra/newview/llfloatersettingsdebug.cpp b/indra/newview/llfloatersettingsdebug.cpp index 53b40f8b7a..616e9bac35 100644 --- a/indra/newview/llfloatersettingsdebug.cpp +++ b/indra/newview/llfloatersettingsdebug.cpp @@ -39,6 +39,7 @@ #include "llspinctrl.h" #include "llcolorswatch.h" #include "llviewercontrol.h" +#include "lltexteditor.h" LLFloaterSettingsDebug::LLFloaterSettingsDebug(const LLSD& key) -- cgit v1.2.3