1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Merge pull request #25747 from peppy/fix-hit-error-clear

Fix hit error displays not clearing on seek
This commit is contained in:
Dean Herbert 2023-12-13 17:36:24 +09:00 committed by GitHub
commit 9235f3d935
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 2 deletions

View File

@ -17,6 +17,7 @@ namespace osu.Game.Screens.Play
/// Encapsulates gameplay timing logic and provides a <see cref="IGameplayClock"/> via DI for gameplay components to use.
/// </summary>
[Cached(typeof(IGameplayClock))]
[Cached(typeof(GameplayClockContainer))]
public partial class GameplayClockContainer : Container, IAdjustableClock, IGameplayClock
{
public IBindable<bool> IsPaused => isPaused;

View File

@ -485,7 +485,14 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
}
}
public override void Clear() => judgementsContainer.Clear();
public override void Clear()
{
foreach (var j in judgementsContainer)
{
j.ClearTransforms();
j.Expire();
}
}
public enum CentreMarkerStyles
{

View File

@ -63,7 +63,14 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
judgementsFlow.Push(GetColourForHitResult(judgement.Type));
}
public override void Clear() => judgementsFlow.Clear();
public override void Clear()
{
foreach (var j in judgementsFlow)
{
j.ClearTransforms();
j.Expire();
}
}
private partial class JudgementFlow : FillFlowContainer<HitErrorShape>
{