diff --git a/Assets/Scripts/Main Menu/SettingsMenu.cs b/Assets/Scripts/Main Menu/SettingsMenu.cs index 9d12d56..8b7d70e 100644 --- a/Assets/Scripts/Main Menu/SettingsMenu.cs +++ b/Assets/Scripts/Main Menu/SettingsMenu.cs @@ -22,13 +22,18 @@ void Start() { resolutionDropdown.ClearOptions(); List options = new List(); - int currentResolutionIndex = 0; + int currentResolutionIndex = -1; + int amtOfIndexToRm = 0; for (int i = 0; i < resolutions.Length; i++) { string option = resolutions[i].width + " x " + resolutions[i].height; - if (!options.Contains(option)) { + if (!options.Contains(option) && ((resolutions[i].width / 16).Equals(resolutions[i].height / 9))) { options.Add(option); + } else { + if (currentResolutionIndex == -1) { + amtOfIndexToRm = amtOfIndexToRm + 1; + } } // comparison to update the resolution at the start @@ -39,7 +44,8 @@ void Start() { } resolutionDropdown.AddOptions(options); - resolutionDropdown.value = currentResolutionIndex; + resolutionDropdown.value = currentResolutionIndex - amtOfIndexToRm >= 0 ? currentResolutionIndex - amtOfIndexToRm : 0; + Debug.Log("Resolution Dropdown Chosen Index at: " + resolutionDropdown.value); resolutionDropdown.RefreshShownValue(); if (GameMgrSingleton.GM != null) {