mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 19:27:31 +08:00
Make OsuGame
dependency nullable
This commit is contained in:
parent
71b5be2568
commit
be1a712f33
@ -44,7 +44,7 @@ namespace osu.Game.Overlays
|
|||||||
private AudioManager audio { get; set; } = null!;
|
private AudioManager audio { get; set; } = null!;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuGame game { get; set; } = null!;
|
private OsuGame? game { get; set; }
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
private OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Purple);
|
||||||
@ -181,8 +181,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
if (notification.FlashTaskbar)
|
if (notification.FlashTaskbar)
|
||||||
{
|
{
|
||||||
game.Window?.Flash(notification.IsImportant);
|
game?.Window?.Flash(notification.IsImportant);
|
||||||
notification.Closed += () => game.Window?.CancelFlash();
|
notification.Closed += () => game?.Window?.CancelFlash();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (State.Value == Visibility.Hidden)
|
if (State.Value == Visibility.Hidden)
|
||||||
|
Loading…
Reference in New Issue
Block a user