From 89a510de10c48ebcf82b98a962e4bf66477dcc93 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 4 Sep 2009 01:56:20 -0500 Subject: Applied Kitty Barnett's RLVa 1.0.1h (Restrained Life) patch. Made a few non-functional changes to help it apply. --- linden/indra/newview/llfloatersettingsdebug.cpp | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'linden/indra/newview/llfloatersettingsdebug.cpp') diff --git a/linden/indra/newview/llfloatersettingsdebug.cpp b/linden/indra/newview/llfloatersettingsdebug.cpp index e440c4a..58f37c5 100644 --- a/linden/indra/newview/llfloatersettingsdebug.cpp +++ b/linden/indra/newview/llfloatersettingsdebug.cpp @@ -39,6 +39,11 @@ #include "llcolorswatch.h" #include "llviewercontrol.h" +// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0g) +#include "rlvhandler.h" +#include "rlvextensions.h" +// [/RLVa:KB] + LLFloaterSettingsDebug* LLFloaterSettingsDebug::sInstance = NULL; LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater(std::string("Configuration Editor")) @@ -239,6 +244,32 @@ void LLFloaterSettingsDebug::updateControl(LLControlVariable* controlp) if (controlp) { +// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-0.2.1d + if (rlv_handler_t::isEnabled()) + { + // Don't allow changing DBG_WRITE debug settings under @setdebug=n + bool fEnable = !( (gRlvHandler.hasBehaviour(RLV_BHVR_SETDEBUG)) && + (RlvExtGetSet::getDebugSettingFlags(controlp->getName()) & RlvExtGetSet::DBG_WRITE) ); + // Don't allow toggling "Basic Shaders" and/or "Atmopsheric Shaders" through the debug settings under @setenv=n + fEnable &= !((gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) && + (("VertexShaderEnable" == controlp->getName()) || ("WindLightUseAtmosShaders" == controlp->getName()))); + #ifdef RLV_EXTENSION_STARTLOCATION + // Don't allow toggling RestrainedLifeLoginLastLocation + fEnable &= !(RLV_SETTING_LOGINLASTLOCATION == controlp->getName()); + #endif // RLV_EXTENSION_STARTLOCATION + + // NOTE: this runs per-frame so there's no need to explictly handle onCommitSettings() or onClickDefault() + spinner1->setEnabled(fEnable); + spinner2->setEnabled(fEnable); + spinner3->setEnabled(fEnable); + spinner4->setEnabled(fEnable); + color_swatch->setEnabled(fEnable); + childSetEnabled("val_text", fEnable); + childSetEnabled("boolean_combo", fEnable); + childSetEnabled("default_btn", fEnable); + } +// [/RLVa:KB] + eControlType type = controlp->type(); //hide combo box only for non booleans, otherwise this will result in the combo box closing every frame -- cgit v1.1