Remove #nullable disable from TimingScreen

This commit is contained in:
Jai Sharma 2022-11-27 02:43:22 +00:00
parent 61bfd2f6b2
commit 1a914d0df7

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.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
@ -50,24 +48,24 @@ namespace osu.Game.Screens.Edit.Timing
public partial class ControlPointList : CompositeDrawable public partial class ControlPointList : CompositeDrawable
{ {
private OsuButton deleteButton; private OsuButton deleteButton = null!;
private ControlPointTable table; private ControlPointTable table = null!;
private OsuScrollContainer scroll = null!;
private RoundedButton addButton = null!;
private readonly IBindableList<ControlPointGroup> controlPointGroups = new BindableList<ControlPointGroup>(); private readonly IBindableList<ControlPointGroup> controlPointGroups = new BindableList<ControlPointGroup>();
private RoundedButton addButton; [Resolved]
private EditorClock clock { get; set; } = null!;
[Resolved] [Resolved]
private EditorClock clock { get; set; } protected EditorBeatmap Beatmap { get; private set; } = null!;
[Resolved] [Resolved]
protected EditorBeatmap Beatmap { get; private set; } private Bindable<ControlPointGroup?> selectedGroup { get; set; } = null!;
[Resolved] [Resolved]
private Bindable<ControlPointGroup> selectedGroup { get; set; } private IEditorChangeHandler? changeHandler { get; set; }
[Resolved(canBeNull: true)]
private IEditorChangeHandler changeHandler { get; set; }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OverlayColourProvider colours) private void load(OverlayColourProvider colours)
@ -132,8 +130,8 @@ namespace osu.Game.Screens.Edit.Timing
deleteButton.Enabled.Value = selected.NewValue != null; deleteButton.Enabled.Value = selected.NewValue != null;
addButton.Text = selected.NewValue != null addButton.Text = selected.NewValue != null
? "+ Clone to current time" ? @"+ Clone to current time"
: "+ Add at current time"; : @"+ Add at current time";
}, true); }, true);
controlPointGroups.BindTo(Beatmap.ControlPointInfo.Groups); controlPointGroups.BindTo(Beatmap.ControlPointInfo.Groups);
@ -159,7 +157,7 @@ namespace osu.Game.Screens.Edit.Timing
addButton.Enabled.Value = clock.CurrentTimeAccurate != selectedGroup.Value?.Time; addButton.Enabled.Value = clock.CurrentTimeAccurate != selectedGroup.Value?.Time;
} }
private Type trackedType; private Type? trackedType;
/// <summary> /// <summary>
/// Given the user has selected a control point group, we want to track any group which is /// Given the user has selected a control point group, we want to track any group which is