Add nullable annotation to LayoutSettings

This commit is contained in:
Susko3
2022-10-03 23:23:02 +02:00
parent e98b4b4fbd
commit 31fefc1ee2

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
#nullable disable
using System; using System;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
@ -29,31 +27,31 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
{ {
protected override LocalisableString Header => GraphicsSettingsStrings.LayoutHeader; protected override LocalisableString Header => GraphicsSettingsStrings.LayoutHeader;
private FillFlowContainer<SettingsSlider<float>> scalingSettings; private FillFlowContainer<SettingsSlider<float>> scalingSettings = null!;
private readonly Bindable<Display> currentDisplay = new Bindable<Display>(); private readonly Bindable<Display> currentDisplay = new Bindable<Display>();
private readonly IBindableList<WindowMode> windowModes = new BindableList<WindowMode>(); private readonly IBindableList<WindowMode> windowModes = new BindableList<WindowMode>();
private Bindable<ScalingMode> scalingMode; private Bindable<ScalingMode> scalingMode = null!;
private Bindable<Size> sizeFullscreen; private Bindable<Size> sizeFullscreen = null!;
private readonly BindableList<Size> resolutions = new BindableList<Size>(new[] { new Size(9999, 9999) }); private readonly BindableList<Size> resolutions = new BindableList<Size>(new[] { new Size(9999, 9999) });
private readonly IBindable<FullscreenCapability> fullscreenCapability = new Bindable<FullscreenCapability>(FullscreenCapability.Capable); private readonly IBindable<FullscreenCapability> fullscreenCapability = new Bindable<FullscreenCapability>(FullscreenCapability.Capable);
[Resolved] [Resolved]
private OsuGameBase game { get; set; } private OsuGameBase game { get; set; } = null!;
[Resolved] [Resolved]
private GameHost host { get; set; } private GameHost host { get; set; } = null!;
private SettingsDropdown<Size> resolutionDropdown; private SettingsDropdown<Size> resolutionDropdown = null!;
private SettingsDropdown<Display> displayDropdown; private SettingsDropdown<Display> displayDropdown = null!;
private SettingsDropdown<WindowMode> windowModeDropdown; private SettingsDropdown<WindowMode> windowModeDropdown = null!;
private Bindable<float> scalingPositionX; private Bindable<float> scalingPositionX = null!;
private Bindable<float> scalingPositionY; private Bindable<float> scalingPositionY = null!;
private Bindable<float> scalingSizeX; private Bindable<float> scalingSizeX = null!;
private Bindable<float> scalingSizeY; private Bindable<float> scalingSizeY = null!;
private const int transition_duration = 400; private const int transition_duration = 400;
@ -280,7 +278,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
}; };
} }
private Drawable preview; private Drawable? preview;
private void showPreview() private void showPreview()
{ {