diff options
Diffstat (limited to 'Thronefall_v1.0/Decompile/SettingsShadowResolution.cs')
-rw-r--r-- | Thronefall_v1.0/Decompile/SettingsShadowResolution.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Thronefall_v1.0/Decompile/SettingsShadowResolution.cs b/Thronefall_v1.0/Decompile/SettingsShadowResolution.cs new file mode 100644 index 0000000..d8bb6cb --- /dev/null +++ b/Thronefall_v1.0/Decompile/SettingsShadowResolution.cs @@ -0,0 +1,26 @@ +using UnityEngine; + +public class SettingsShadowResolution : MonoBehaviour +{ + public EnumSelector selector; + + private void Start() + { + selector.onChange.AddListener(OnChange); + } + + private void OnEnable() + { + selector.options.Clear(); + selector.options.AddRange(new string[5] { "256", "512", "1024", "2048", "4096" }); + if ((bool)SettingsManager.Instance) + { + selector.SetIndex(SettingsManager.AALevelToInt(SettingsManager.Instance.AntiAliasing)); + } + } + + private void OnChange() + { + SettingsManager.Instance.SetAntiAliasing(SettingsManager.IntToAALevel(selector.Index)); + } +} |