mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 18:13:09 +08: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.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
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 drawable_judgement_size = 8;
|
||||||
private const int spacing = 2;
|
private const int spacing = 2;
|
||||||
|
|
||||||
private int runningDepth;
|
public override IEnumerable<Drawable> FlowingChildren => base.FlowingChildren.Reverse();
|
||||||
|
|
||||||
public JudgementFlow()
|
public JudgementFlow()
|
||||||
{
|
{
|
||||||
@ -47,7 +48,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
|
|
||||||
public void Push(Color4 colour)
|
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)
|
if (Children.Count > max_available_judgements)
|
||||||
Children.FirstOrDefault(c => !c.IsRemoved)?.Remove();
|
Children.FirstOrDefault(c => !c.IsRemoved)?.Remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user