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:
parent
5970a68e2d
commit
4110adc4c0
@ -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),
|
||||
},
|
||||
|
@ -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())
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user