Skip to content

Commit

Permalink
Remove x symbol from argon mania combo counter
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Aug 15, 2024
1 parent ff1ab2b commit 3a4546d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
{
public partial class ArgonManiaComboCounter : ArgonComboCounter
{

protected override bool DisplayXSymbol => false;
}
}
8 changes: 5 additions & 3 deletions osu.Game/Screens/Play/HUD/ArgonComboCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public partial class ArgonComboCounter : ComboCounter

protected override double RollingDuration => 250;

protected virtual bool DisplayXSymbol => true;

[SettingSource("Wireframe opacity", "Controls the opacity of the wireframes behind the digits.")]
public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.25f)
{
Expand Down Expand Up @@ -76,15 +78,15 @@ private void updateWireframe()

private int getDigitsRequiredForDisplayCount()
{
// one for the single presumed starting digit, one for the "x" at the end.
int digitsRequired = 2;
// one for the single presumed starting digit, one for the "x" at the end (unless disabled).
int digitsRequired = DisplayXSymbol ? 2 : 1;
long c = DisplayedCount;
while ((c /= 10) > 0)
digitsRequired++;
return digitsRequired;
}

protected override LocalisableString FormatCount(int count) => $@"{count}x";
protected override LocalisableString FormatCount(int count) => DisplayXSymbol ? $@"{count}x" : count.ToString();

protected override IHasText CreateText() => Text = new ArgonCounterTextComponent(Anchor.TopLeft, MatchesStrings.MatchScoreStatsCombo.ToUpper())
{
Expand Down

0 comments on commit 3a4546d

Please sign in to comment.