1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Nullability

This commit is contained in:
ansel 2023-01-07 03:08:02 +03:00
parent 167ac8b5dd
commit b47cef838c

View File

@ -14,28 +14,28 @@ namespace osu.Game.Screens.Edit.Setup
{
internal partial class ResourcesSection : SetupSection
{
private LabelledFileChooser audioTrackChooser;
private LabelledFileChooser backgroundChooser;
private LabelledFileChooser audioTrackChooser = null!;
private LabelledFileChooser backgroundChooser = null!;
public override LocalisableString Title => EditorSetupStrings.ResourcesHeader;
[Resolved]
private MusicController music { get; set; }
private MusicController music { get; set; } = null!;
[Resolved]
private BeatmapManager beatmaps { get; set; }
private BeatmapManager beatmaps { get; set; } = null!;
[Resolved]
private IBindable<WorkingBeatmap> working { get; set; }
private IBindable<WorkingBeatmap> working { get; set; } = null!;
[Resolved]
private EditorBeatmap editorBeatmap { get; set; }
private EditorBeatmap editorBeatmap { get; set; } = null!;
[Resolved]
private Editor? editor { get; set; }
[Resolved]
private SetupScreenHeader header { get; set; }
private SetupScreenHeader header { get; set; } = null!;
[BackgroundDependencyLoader]
private void load()
@ -128,17 +128,17 @@ namespace osu.Game.Screens.Edit.Setup
return true;
}
private void backgroundChanged(ValueChangedEvent<FileInfo> file)
private void backgroundChanged(ValueChangedEvent<FileInfo?> file)
{
if (!ChangeBackgroundImage(file.NewValue))
if (!ChangeBackgroundImage(file.NewValue!))
backgroundChooser.Current.Value = file.OldValue;
updatePlaceholderText();
}
private void audioTrackChanged(ValueChangedEvent<FileInfo> file)
private void audioTrackChanged(ValueChangedEvent<FileInfo?> file)
{
if (!ChangeAudioTrack(file.NewValue))
if (!ChangeAudioTrack(file.NewValue!))
audioTrackChooser.Current.Value = file.OldValue;
updatePlaceholderText();