| | 1 | | using DCL.Interface; |
| | 2 | | using DCL.SettingsCommon.SettingsControllers.BaseControllers; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers |
| | 6 | | { |
| | 7 | | [CreateAssetMenu(menuName = "Settings/Controllers/Controls/Base Resolution", fileName = "BaseResolutionControlContro |
| | 8 | | public class BaseResolutionControlController : SpinBoxSettingsControlController |
| | 9 | | { |
| 2 | 10 | | public override object GetStoredValue() { return (int)currentQualitySetting.baseResolution; } |
| | 11 | |
|
| | 12 | | public override void UpdateSetting(object newValue) |
| | 13 | | { |
| 2 | 14 | | currentQualitySetting.baseResolution = (QualitySettings.BaseResolution)newValue; |
| | 15 | |
|
| 2 | 16 | | switch (currentQualitySetting.baseResolution) |
| | 17 | | { |
| | 18 | | case QualitySettings.BaseResolution.BaseRes_720: |
| 0 | 19 | | WebInterface.SetBaseResolution(820); |
| 0 | 20 | | break; |
| | 21 | | case QualitySettings.BaseResolution.BaseRes_1080: |
| 2 | 22 | | WebInterface.SetBaseResolution(1080); |
| 2 | 23 | | break; |
| | 24 | | case QualitySettings.BaseResolution.BaseRes_Unlimited: |
| 0 | 25 | | WebInterface.SetBaseResolution(9999); |
| | 26 | | break; |
| | 27 | | } |
| 0 | 28 | | } |
| | 29 | | } |
| | 30 | | } |