diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableComboCounter.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableComboCounter.cs index 1c5a05dd1d..bd1fe050af 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableComboCounter.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableComboCounter.cs @@ -4,6 +4,7 @@ using NUnit.Framework; using osu.Framework.Allocation; using osu.Framework.Graphics; +using osu.Framework.Testing; using osu.Game.Rulesets.Scoring; using osu.Game.Screens.Play.HUD; @@ -24,5 +25,17 @@ public void TestComboCounterIncrementing() AddStep("reset combo", () => scoreProcessor.Combo.Value = 0); } + + [Test] + public void TestLegacyComboCounterHiddenByRulesetImplementation() + { + AddToggleStep("toggle legacy hidden by ruleset", visible => + { + foreach (var legacyCounter in this.ChildrenOfType()) + legacyCounter.HiddenByRulesetImplementation = visible; + }); + + AddRepeatStep("increase combo", () => scoreProcessor.Combo.Value++, 10); + } } } diff --git a/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs b/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs index f1078c5d55..567e4386c6 100644 --- a/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs +++ b/osu.Game/Screens/Play/HUD/LegacyComboCounter.cs @@ -69,21 +69,21 @@ public LegacyComboCounter() InternalChildren = new[] { - popOutCount = new LegacySpriteText(LegacyFont.Combo) - { - Alpha = 0, - Margin = new MarginPadding(0.05f), - Blending = BlendingParameters.Additive, - Anchor = Anchor.BottomLeft, - Origin = Anchor.BottomLeft, - BypassAutoSizeAxes = Axes.Both, - }, counterContainer = new Container { AutoSizeAxes = Axes.Both, AlwaysPresent = true, Children = new[] { + popOutCount = new LegacySpriteText(LegacyFont.Combo) + { + Alpha = 0, + Margin = new MarginPadding(0.05f), + Blending = BlendingParameters.Additive, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, + BypassAutoSizeAxes = Axes.Both, + }, displayedCountSpriteText = new LegacySpriteText(LegacyFont.Combo) { // Initial text and AlwaysPresent allow the counter to have a size before it first displays a combo.