From 34b0101ff4d5688c8ff08a4d433dcc1210a94b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 26 Dec 2021 16:44:39 +0100 Subject: [PATCH 1/2] Add visual test coverage of "hidden by ruleset" combo option --- .../Gameplay/TestSceneSkinnableComboCounter.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 @@ namespace osu.Game.Tests.Visual.Gameplay 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); + } } } From 5a591713aeddc1f2d955c6d551879ce7478aa32e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sun, 26 Dec 2021 16:44:59 +0100 Subject: [PATCH 2/2] Fix legacy combo counter not fully hiding for rulesets that implement their own --- .../Screens/Play/HUD/LegacyComboCounter.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 @@ namespace osu.Game.Screens.Play.HUD 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.