| | 1 | | using DCL.SettingsCommon.SettingsControllers.BaseControllers; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.Rendering.Universal; |
| | 4 | |
|
| | 5 | | namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers |
| | 6 | | { |
| | 7 | | [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Color Grading", fileName = "ColorGradingControlController |
| | 8 | | public class ColorGradingControlController : ToggleSettingsControlController |
| | 9 | | { |
| 2 | 10 | | public override object GetStoredValue() { return currentQualitySetting.colorGrading; } |
| | 11 | |
|
| | 12 | | public override void UpdateSetting(object newValue) |
| | 13 | | { |
| 2 | 14 | | currentQualitySetting.colorGrading = (bool)newValue; |
| | 15 | |
|
| | 16 | | Tonemapping toneMapping; |
| 2 | 17 | | if (QualitySettingsReferences.i.postProcessVolume.profile.TryGet<Tonemapping>(out toneMapping)) |
| | 18 | | { |
| 2 | 19 | | toneMapping.active = currentQualitySetting.colorGrading; |
| | 20 | | } |
| 2 | 21 | | } |
| | 22 | | } |
| | 23 | | } |