From 10fe2382b08abf113d0ca020f11307284041cb9e Mon Sep 17 00:00:00 2001 From: sh0ckR6 Date: Mon, 20 Sep 2021 10:07:42 -0400 Subject: [PATCH] Address most issues --- osu.Game/Screens/Play/HUD/HitErrorMeters/BarHitErrorMeter.cs | 2 +- .../Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs | 2 +- osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs | 5 ++++- osu.Game/Screens/Play/Player.cs | 5 ++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Play/HUD/HitErrorMeters/BarHitErrorMeter.cs b/osu.Game/Screens/Play/HUD/HitErrorMeters/BarHitErrorMeter.cs index 2b5228cab0..604df0b774 100644 --- a/osu.Game/Screens/Play/HUD/HitErrorMeters/BarHitErrorMeter.cs +++ b/osu.Game/Screens/Play/HUD/HitErrorMeters/BarHitErrorMeter.cs @@ -280,6 +280,6 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters } } - public override void Clear() => judgementsContainer.Clear(true); + protected override void Clear() => judgementsContainer.Clear(); } } diff --git a/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs b/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs index ea64d1f4d9..19ba1910e6 100644 --- a/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs +++ b/osu.Game/Screens/Play/HUD/HitErrorMeters/ColourHitErrorMeter.cs @@ -33,7 +33,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters judgementsFlow.Push(GetColourForHitResult(judgement.Type)); } - public override void Clear() => judgementsFlow.Clear(true); + protected override void Clear() => judgementsFlow.Clear(); private class JudgementFlow : FillFlowContainer { diff --git a/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs b/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs index 1871519ab5..f9d4d89d1b 100644 --- a/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs +++ b/osu.Game/Screens/Play/HUD/HitErrorMeters/HitErrorMeter.cs @@ -77,7 +77,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters /// Invoked by when the active seeks through the current beatmap. /// Any inheritors of should have this method clear their container that displays the hit error results. /// - public abstract void Clear(); + protected abstract void Clear(); protected override void Dispose(bool isDisposing) { @@ -85,6 +85,9 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters if (processor != null) processor.NewJudgement -= OnNewJudgement; + + if (player != null) + player.OnSeek -= Clear; } } } diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index e982d02baf..cde3cda369 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -69,7 +69,10 @@ namespace osu.Game.Screens.Play public Action RestartRequested; - public Action OnSeek; + /// + /// Invoked when a seek has been performed via + /// + public event Action OnSeek; public bool HasFailed { get; private set; }