Only display SupportedWindowModes in settings

This commit is contained in:
Shane Woolcock
2019-02-28 20:19:51 +09:00
parent a716e5b265
commit 94199e628c
2 changed files with 21 additions and 4 deletions

View File

@ -11,6 +11,7 @@ using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Platform;
using osu.Game.Configuration;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
@ -29,7 +30,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
private OsuGameBase game;
private SettingsDropdown<Size> resolutionDropdown;
private SettingsEnumDropdown<WindowMode> windowModeDropdown;
private SettingsDropdown<WindowMode> windowModeDropdown;
private Bindable<float> scalingPositionX;
private Bindable<float> scalingPositionY;
@ -39,7 +40,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
private const int transition_duration = 400;
[BackgroundDependencyLoader]
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig, OsuGameBase game)
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig, OsuGameBase game, GameHost host)
{
this.game = game;
@ -54,10 +55,11 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
Children = new Drawable[]
{
windowModeDropdown = new SettingsEnumDropdown<WindowMode>
windowModeDropdown = new SettingsDropdown<WindowMode>
{
LabelText = "Screen mode",
Bindable = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode),
ItemSource = host.Window.SupportedWindowModes,
},
resolutionSettingsContainer = new Container
{