1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:02:53 +08:00

Fix missing wireframe on argon combo counter

This commit is contained in:
Dean Herbert 2024-01-09 20:16:27 +09:00
parent 5970a68e2d
commit 4110adc4c0
No known key found for this signature in database
3 changed files with 25 additions and 5 deletions

View File

@ -83,6 +83,7 @@ namespace osu.Game.Screens.Play.HUD
},
fractionPart = new ArgonCounterTextComponent(Anchor.TopLeft)
{
RequiredDisplayDigits = { Value = 2 },
WireframeOpacity = { BindTarget = WireframeOpacity },
Scale = new Vector2(0.5f),
},

View File

@ -57,6 +57,30 @@ namespace osu.Game.Screens.Play.HUD
});
}
public override int DisplayedCount
{
get => base.DisplayedCount;
set
{
base.DisplayedCount = value;
updateWireframe();
}
}
private void updateWireframe()
{
text.RequiredDisplayDigits.Value = getDigitsRequiredForDisplayCount();
}
private int getDigitsRequiredForDisplayCount()
{
int digitsRequired = 1;
long c = DisplayedCount;
while ((c /= 10) > 0)
digitsRequired++;
return digitsRequired;
}
protected override LocalisableString FormatCount(int count) => $@"{count}x";
protected override IHasText CreateText() => text = new ArgonCounterTextComponent(Anchor.TopLeft, MatchesStrings.MatchScoreStatsCombo.ToUpper())

View File

@ -11,11 +11,6 @@ namespace osu.Game.Screens.Play.HUD
{
public bool UsesFixedAnchor { get; set; }
protected ComboCounter()
{
Current.Value = DisplayedCount = 0;
}
protected override double GetProportionalDuration(int currentValue, int newValue)
{
return Math.Abs(currentValue - newValue) * RollingDuration * 100.0f;