fix tests incorrectly showing judgements not present in mania

This commit is contained in:
mcendu 2020-06-12 23:06:19 +08:00
parent 586e3d405c
commit 7def6a9181
1 changed files with 10 additions and 6 deletions

View File

@ -6,6 +6,7 @@
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mania.Scoring;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
@ -16,14 +17,17 @@ public class TestSceneDrawableJudgement : ManiaSkinnableTestScene
{
public TestSceneDrawableJudgement()
{
var HitWindows = new ManiaHitWindows();
foreach (HitResult result in Enum.GetValues(typeof(HitResult)).OfType<HitResult>().Skip(1))
{
AddStep("Show " + result.GetDescription(), () => SetContents(() =>
new DrawableManiaJudgement(new JudgementResult(new HitObject(), new Judgement()) { Type = result }, null)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
}));
if (HitWindows.IsHitResultAllowed(result))
AddStep("Show " + result.GetDescription(), () => SetContents(() =>
new DrawableManiaJudgement(new JudgementResult(new HitObject(), new Judgement()) { Type = result }, null)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
}));
}
}
}