diff options
author | Graham Linden <graham@lindenlab.com> | 2018-09-10 16:43:49 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-09-10 16:43:49 +0100 |
commit | e075c65ee22a54b114808057399b5c7546dfb08a (patch) | |
tree | 40fb68045e86bca3cb465ecde91664d58ad552cd /indra/newview/llfloatereditextdaycycle.cpp | |
parent | eb1ddbc14256e9321887efa8c5fb29637bd7f5a0 (diff) |
First pass at preferences and feature table hookup for advanced atmospherics.
Diffstat (limited to 'indra/newview/llfloatereditextdaycycle.cpp')
-rw-r--r-- | indra/newview/llfloatereditextdaycycle.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index 7b5a848188..d4f0c934e7 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -195,13 +195,30 @@ BOOL LLFloaterEditExtDayCycle::postBuild() LLTabContainer* tab_container = mSkyTabLayoutContainer->getChild<LLTabContainer>("sky_tabs"); S32 tab_count = tab_container->getTabCount(); + LLSettingsEditPanel *panel = nullptr; for (S32 idx = 0; idx < tab_count; ++idx) { - LLSettingsEditPanel *panel = static_cast<LLSettingsEditPanel *>(tab_container->getPanelByIndex(idx)); + panel = static_cast<LLSettingsEditPanel *>(tab_container->getPanelByIndex(idx)); if (panel) panel->setOnDirtyFlagChanged([this](LLPanel *, bool val) { onPanelDirtyFlagChanged(val); }); } + panel = dynamic_cast<LLPanelSettingsSkyDensityTab*>(tab_container->getChildView("advanced_atmo_panel")); + if (panel) + { + if (gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics")) + { + panel->setEnabled(true); + panel->setAllChildrenEnabled(true); + } + else + { + panel->setEnabled(false); + panel->setAllChildrenEnabled(false); + panel->setVisible(false); + } + } + tab_container = mWaterTabLayoutContainer->getChild<LLTabContainer>("water_tabs"); tab_count = tab_container->getTabCount(); @@ -833,6 +850,7 @@ void LLFloaterEditExtDayCycle::updateSkyTabs(const LLSettingsSkyPtr_t &p_sky) } else { + panel->setEnabled(false); panel->setVisible(false); } } @@ -875,8 +893,17 @@ void LLFloaterEditExtDayCycle::setSkyTabsEnabled(BOOL enable) panel = dynamic_cast<LLPanelSettingsSkyDensityTab*>(tab_container->getChildView("advanced_atmo_panel")); if (panel) { - panel->setEnabled(enable); - panel->setAllChildrenEnabled(enable); + if (gSavedSettings.getBOOL("RenderUseAdvancedAtmospherics")) + { + panel->setEnabled(enable); + panel->setAllChildrenEnabled(enable); + } + else + { + panel->setEnabled(false); + panel->setAllChildrenEnabled(false); + panel->setVisible(false); + } } } |