mirror of
https://github.com/ppy/osu
synced 2025-02-10 15:17:32 +00:00
Fix incorrect insert logic
This commit is contained in:
parent
c390348eab
commit
851b891285
@ -1,6 +1,7 @@
|
||||
// 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.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -33,7 +34,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
||||
private const int drawable_judgement_size = 8;
|
||||
private const int spacing = 2;
|
||||
|
||||
private int runningDepth;
|
||||
public override IEnumerable<Drawable> FlowingChildren => base.FlowingChildren.Reverse();
|
||||
|
||||
public JudgementFlow()
|
||||
{
|
||||
@ -47,7 +48,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
||||
|
||||
public void Push(Color4 colour)
|
||||
{
|
||||
Insert(runningDepth--, new DrawableResult(colour, drawable_judgement_size));
|
||||
Add(new DrawableResult(colour, drawable_judgement_size));
|
||||
|
||||
if (Children.Count > max_available_judgements)
|
||||
Children.FirstOrDefault(c => !c.IsRemoved)?.Remove();
|
||||
|
Loading…
Reference in New Issue
Block a user