mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 22:13:20 +08:00
Fix number of judgements shown potentially exceeding upper limit
This commit is contained in:
parent
59a8603728
commit
308ed1abd1
@ -163,10 +163,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
AddUntilStep("wait for bars to disappear", () => !this.ChildrenOfType<BarHitErrorMeter.JudgementLine>().Any());
|
AddUntilStep("wait for bars to disappear", () => !this.ChildrenOfType<BarHitErrorMeter.JudgementLine>().Any());
|
||||||
AddUntilStep("ensure max circles not exceeded", () =>
|
AddUntilStep("ensure max circles not exceeded", () =>
|
||||||
{
|
this.ChildrenOfType<ColourHitErrorMeter>().First().ChildrenOfType<ColourHitErrorMeter.HitErrorShape>().Count(), () => Is.LessThanOrEqualTo(max_displayed_judgements));
|
||||||
return this.ChildrenOfType<ColourHitErrorMeter>()
|
|
||||||
.All(m => m.ChildrenOfType<ColourHitErrorMeter.HitErrorShape>().Count() <= max_displayed_judgements);
|
|
||||||
});
|
|
||||||
|
|
||||||
AddStep("show displays", () =>
|
AddStep("show displays", () =>
|
||||||
{
|
{
|
||||||
|
@ -102,9 +102,9 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
{
|
{
|
||||||
shape.Colour = colour;
|
shape.Colour = colour;
|
||||||
Add(shape);
|
Add(shape);
|
||||||
});
|
|
||||||
|
|
||||||
removeExtraJudgements();
|
removeExtraJudgements();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeExtraJudgements()
|
private void removeExtraJudgements()
|
||||||
@ -167,17 +167,20 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
|
|||||||
{
|
{
|
||||||
base.PrepareForUse();
|
base.PrepareForUse();
|
||||||
|
|
||||||
IsRemoved = false;
|
this.FadeInFromZero(animation_duration, Easing.OutQuint)
|
||||||
|
|
||||||
this.FadeIn()
|
|
||||||
// On pool re-use, start flow animation from (0,0).
|
// On pool re-use, start flow animation from (0,0).
|
||||||
.MoveTo(Vector2.Zero);
|
.MoveTo(Vector2.Zero);
|
||||||
|
|
||||||
content.FadeInFromZero(animation_duration, Easing.OutQuint)
|
content.MoveToY(-DrawSize.Y)
|
||||||
.MoveToY(-DrawSize.Y)
|
|
||||||
.MoveToY(0, animation_duration, Easing.OutQuint);
|
.MoveToY(0, animation_duration, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void FreeAfterUse()
|
||||||
|
{
|
||||||
|
base.FreeAfterUse();
|
||||||
|
IsRemoved = false;
|
||||||
|
}
|
||||||
|
|
||||||
public void Remove()
|
public void Remove()
|
||||||
{
|
{
|
||||||
IsRemoved = true;
|
IsRemoved = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user