1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:12:57 +08:00

Make resolved properties nullable.

This commit is contained in:
Nitrous 2024-01-09 12:48:11 +08:00
parent 2e041823a1
commit afa808695b
No known key found for this signature in database
GPG Key ID: A5D82BAEC7C1D1F5

View File

@ -33,10 +33,10 @@ namespace osu.Game.Screens.Play.PlayerSettings
private readonly IconButton play;
[Resolved]
private GameplayClockContainer gameplayClock { get; set; } = null!;
private GameplayClockContainer? gameplayClock { get; set; }
[Resolved]
private GameplayState gameplayState { get; set; } = null!;
private GameplayState? gameplayState { get; set; }
public PlaybackSettings()
: base("playback")
@ -150,7 +150,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
protected override void Update()
{
base.Update();
play.Icon = gameplayClock.IsRunning ? FontAwesome.Regular.PauseCircle : FontAwesome.Regular.PlayCircle;
play.Icon = gameplayClock?.IsRunning == true ? FontAwesome.Regular.PauseCircle : FontAwesome.Regular.PlayCircle;
}
}
}