| | 1 | | using DCL.SettingsCommon.SettingsControllers.BaseControllers; |
| | 2 | | using System.Collections; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using UnityEngine; |
| | 5 | |
|
| | 6 | | namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers |
| | 7 | | { |
| | 8 | | [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Reflection Resolution", fileName = "ReflectionResolutionC |
| | 9 | | public class RefectionResolutionControlController : SpinBoxSettingsControlController |
| | 10 | | { |
| | 11 | |
|
| 1 | 12 | | public override object GetStoredValue() { return (int)currentQualitySetting.reflectionResolution; } |
| | 13 | |
|
| | 14 | | public override void UpdateSetting(object newValue) |
| | 15 | | { |
| 1 | 16 | | int value = (int)newValue; |
| 1 | 17 | | currentQualitySetting.reflectionResolution = (QualitySettings.ReflectionResolution)value; |
| | 18 | |
|
| 1 | 19 | | switch (currentQualitySetting.reflectionResolution) |
| | 20 | | { |
| | 21 | | case QualitySettings.ReflectionResolution.Res_256: |
| 0 | 22 | | DataStore.i.skyboxConfig.reflectionResolution.Set(256); |
| 0 | 23 | | break; |
| | 24 | | case QualitySettings.ReflectionResolution.Res_512: |
| 1 | 25 | | DataStore.i.skyboxConfig.reflectionResolution.Set(512); |
| 1 | 26 | | break; |
| | 27 | | case QualitySettings.ReflectionResolution.Res_1024: |
| 0 | 28 | | DataStore.i.skyboxConfig.reflectionResolution.Set(1024); |
| 0 | 29 | | break; |
| | 30 | | case QualitySettings.ReflectionResolution.Res_2048: |
| 0 | 31 | | DataStore.i.skyboxConfig.reflectionResolution.Set(2048); |
| 0 | 32 | | break; |
| | 33 | | default: |
| 0 | 34 | | DataStore.i.skyboxConfig.reflectionResolution.Set(256); |
| | 35 | | break; |
| | 36 | | } |
| 0 | 37 | | } |
| | 38 | | } |
| | 39 | | } |