mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Merge pull request #16257 from bdach/catch-combo-counter-visible
Fix legacy combo counter not fully hiding for rulesets that implement their own
This commit is contained in:
commit
f7715b930f
@ -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<LegacyComboCounter>())
|
||||
legacyCounter.HiddenByRulesetImplementation = visible;
|
||||
});
|
||||
|
||||
AddRepeatStep("increase combo", () => scoreProcessor.Combo.Value++, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user