diff --git a/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs b/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs index ca00ab12c7..4cc04e1485 100644 --- a/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs +++ b/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs @@ -75,21 +75,21 @@ namespace osu.Game.Screens.Play.HUD AutoSizeAxes = Axes.Both, Child = wholePart = new ArgonCounterTextComponent(Anchor.TopRight, BeatmapsetsStrings.ShowScoreboardHeadersAccuracy.ToUpper()) { - RequiredDisplayDigits = { Value = 3 }, WireframeOpacity = { BindTarget = WireframeOpacity }, + WireframeTemplate = @"###", ShowLabel = { BindTarget = ShowLabel }, } }, fractionPart = new ArgonCounterTextComponent(Anchor.TopLeft) { - RequiredDisplayDigits = { Value = 2 }, WireframeOpacity = { BindTarget = WireframeOpacity }, + WireframeTemplate = @".##", Scale = new Vector2(0.5f), }, percentText = new ArgonCounterTextComponent(Anchor.TopLeft) { Text = @"%", - RequiredDisplayDigits = { Value = 1 }, + WireframeTemplate = @"#", WireframeOpacity = { BindTarget = WireframeOpacity } }, } diff --git a/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs b/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs index 369c753cb0..3f187650b2 100644 --- a/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs +++ b/osu.Game/Screens/Play/HUD/ArgonComboCounter.cs @@ -68,7 +68,10 @@ namespace osu.Game.Screens.Play.HUD private void updateWireframe() { - text.RequiredDisplayDigits.Value = getDigitsRequiredForDisplayCount(); + int digitsRequiredForDisplayCount = getDigitsRequiredForDisplayCount(); + + if (digitsRequiredForDisplayCount != text.WireframeTemplate.Length) + text.WireframeTemplate = new string('#', digitsRequiredForDisplayCount); } private int getDigitsRequiredForDisplayCount() diff --git a/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs b/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs index f8c82feddd..efb4d2108e 100644 --- a/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs +++ b/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs @@ -25,7 +25,6 @@ namespace osu.Game.Screens.Play.HUD private readonly OsuSpriteText labelText; public IBindable WireframeOpacity { get; } = new BindableFloat(); - public Bindable RequiredDisplayDigits { get; } = new BindableInt(); public Bindable ShowLabel { get; } = new BindableBool(); public Container NumberContainer { get; private set; } @@ -36,6 +35,18 @@ namespace osu.Game.Screens.Play.HUD set => textPart.Text = value; } + /// + /// The template for the wireframe displayed behind the . + /// Any character other than a dot is interpreted to mean a full segmented display "wireframe". + /// + public string WireframeTemplate + { + get => wireframeTemplate; + set => wireframesPart.Text = wireframeTemplate = value; + } + + private string wireframeTemplate = string.Empty; + public ArgonCounterTextComponent(Anchor anchor, LocalisableString? label = null) { Anchor = anchor; @@ -69,8 +80,6 @@ namespace osu.Game.Screens.Play.HUD } } }; - - RequiredDisplayDigits.BindValueChanged(digits => wireframesPart.Text = new string('#', digits.NewValue)); } private string textLookup(char c) diff --git a/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs b/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs index 44b9fb3123..a14ab3cbcd 100644 --- a/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs +++ b/osu.Game/Screens/Play/HUD/ArgonScoreCounter.cs @@ -58,8 +58,10 @@ namespace osu.Game.Screens.Play.HUD private void updateWireframe() { - scoreText.RequiredDisplayDigits.Value = - Math.Max(RequiredDisplayDigits.Value, getDigitsRequiredForDisplayCount()); + int digitsRequiredForDisplayCount = Math.Max(RequiredDisplayDigits.Value, getDigitsRequiredForDisplayCount()); + + if (digitsRequiredForDisplayCount != scoreText.WireframeTemplate.Length) + scoreText.WireframeTemplate = new string('#', digitsRequiredForDisplayCount); } private int getDigitsRequiredForDisplayCount()