1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +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 internal partial class ResourcesSection : SetupSection
{ {
private LabelledFileChooser audioTrackChooser; private LabelledFileChooser audioTrackChooser = null!;
private LabelledFileChooser backgroundChooser; private LabelledFileChooser backgroundChooser = null!;
public override LocalisableString Title => EditorSetupStrings.ResourcesHeader; public override LocalisableString Title => EditorSetupStrings.ResourcesHeader;
[Resolved] [Resolved]
private MusicController music { get; set; } private MusicController music { get; set; } = null!;
[Resolved] [Resolved]
private BeatmapManager beatmaps { get; set; } private BeatmapManager beatmaps { get; set; } = null!;
[Resolved] [Resolved]
private IBindable<WorkingBeatmap> working { get; set; } private IBindable<WorkingBeatmap> working { get; set; } = null!;
[Resolved] [Resolved]
private EditorBeatmap editorBeatmap { get; set; } private EditorBeatmap editorBeatmap { get; set; } = null!;
[Resolved] [Resolved]
private Editor? editor { get; set; } private Editor? editor { get; set; }
[Resolved] [Resolved]
private SetupScreenHeader header { get; set; } private SetupScreenHeader header { get; set; } = null!;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
@ -128,17 +128,17 @@ namespace osu.Game.Screens.Edit.Setup
return true; 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; backgroundChooser.Current.Value = file.OldValue;
updatePlaceholderText(); 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; audioTrackChooser.Current.Value = file.OldValue;
updatePlaceholderText(); updatePlaceholderText();