mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:02:54 +08:00
Merge pull request #23089 from Susko3/fix-window-mode-dropdown
Fix window mode dropdown not showing
This commit is contained in:
commit
bc0538a7f6
@ -32,7 +32,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
private FillFlowContainer<SettingsSlider<float>> scalingSettings = null!;
|
||||
|
||||
private readonly Bindable<Display> currentDisplay = new Bindable<Display>();
|
||||
private readonly IBindableList<WindowMode> windowModes = new BindableList<WindowMode>();
|
||||
|
||||
private Bindable<ScalingMode> scalingMode = null!;
|
||||
private Bindable<Size> sizeFullscreen = null!;
|
||||
@ -87,6 +86,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
LabelText = GraphicsSettingsStrings.ScreenMode,
|
||||
Items = window?.SupportedWindowModes,
|
||||
CanBeShown = { Value = window?.SupportedWindowModes.Count() > 1 },
|
||||
Current = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode),
|
||||
},
|
||||
displayDropdown = new DisplaySettingsDropdown
|
||||
@ -180,8 +180,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
updateScreenModeWarning();
|
||||
}, true);
|
||||
|
||||
windowModes.BindCollectionChanged((_, _) => updateDisplaySettingsVisibility());
|
||||
|
||||
currentDisplay.BindValueChanged(display => Schedule(() =>
|
||||
{
|
||||
resolutions.RemoveRange(1, resolutions.Count - 1);
|
||||
@ -235,7 +233,6 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
|
||||
private void updateDisplaySettingsVisibility()
|
||||
{
|
||||
windowModeDropdown.CanBeShown.Value = windowModes.Count > 1;
|
||||
resolutionDropdown.CanBeShown.Value = resolutions.Count > 1 && windowModeDropdown.Current.Value == WindowMode.Fullscreen;
|
||||
displayDropdown.CanBeShown.Value = displayDropdown.Items.Count() > 1;
|
||||
safeAreaConsiderationsCheckbox.CanBeShown.Value = host.Window?.SafeAreaPadding.Value.Total != Vector2.Zero;
|
||||
|
Loading…
Reference in New Issue
Block a user