diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneScoring.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneScoring.cs index 7330e40568..44823607b8 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestSceneScoring.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneScoring.cs @@ -17,6 +17,11 @@ namespace osu.Game.Rulesets.Catch.Tests [TestFixture] public partial class TestSceneScoring : ScoringTestScene { + public TestSceneScoring() + : base(supportsNonPerfectJudgements: false) + { + } + protected override IBeatmap CreateBeatmap(int maxCombo) { var beatmap = new CatchBeatmap(); diff --git a/osu.Game/Tests/Visual/Gameplay/ScoringTestScene.cs b/osu.Game/Tests/Visual/Gameplay/ScoringTestScene.cs index c213a17185..de4688a6fe 100644 --- a/osu.Game/Tests/Visual/Gameplay/ScoringTestScene.cs +++ b/osu.Game/Tests/Visual/Gameplay/ScoringTestScene.cs @@ -40,6 +40,8 @@ public abstract partial class ScoringTestScene : OsuTestScene protected BindableList NonPerfectLocations => graphs.NonPerfectLocations; protected BindableList MissLocations => graphs.MissLocations; + private readonly bool supportsNonPerfectJudgements; + private GraphContainer graphs = null!; private SettingsSlider sliderMaxCombo = null!; private SettingsCheckbox scaleToMax = null!; @@ -54,11 +56,18 @@ public abstract partial class ScoringTestScene : OsuTestScene [Resolved] private OsuColour colours { get; set; } = null!; + protected ScoringTestScene(bool supportsNonPerfectJudgements = true) + { + this.supportsNonPerfectJudgements = supportsNonPerfectJudgements; + } + [SetUpSteps] public void SetUpSteps() { AddStep("setup tests", () => { + OsuTextFlowContainer clickExplainer; + Children = new Drawable[] { new Box @@ -79,7 +88,7 @@ public void SetUpSteps() { new Drawable[] { - graphs = new GraphContainer + graphs = new GraphContainer(supportsNonPerfectJudgements) { RelativeSizeAxes = Axes.Both, }, @@ -120,11 +129,10 @@ public void SetUpSteps() LabelText = "Rescale plots to 100%", Current = { Value = true, Default = true } }, - new OsuTextFlowContainer + clickExplainer = new OsuTextFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Text = "Left click to add miss\nRight click to add OK", Margin = new MarginPadding { Top = 20 } } } @@ -134,6 +142,10 @@ public void SetUpSteps() } }; + clickExplainer.AddParagraph("Left click to add miss"); + if (supportsNonPerfectJudgements) + clickExplainer.AddParagraph("Right click to add OK"); + sliderMaxCombo.Current.BindValueChanged(_ => Rerun()); scaleToMax.Current.BindValueChanged(_ => Rerun()); @@ -286,6 +298,8 @@ protected ProcessorBasedScoringAlgorithm(IBeatmap beatmap, ScoringMode mode) public partial class GraphContainer : Container, IHasCustomTooltip> { + private readonly bool supportsNonPerfectJudgements; + public readonly BindableList MissLocations = new BindableList(); public readonly BindableList NonPerfectLocations = new BindableList(); @@ -300,8 +314,9 @@ public partial class GraphContainer : Container, IHasCustomTooltip