mirror of
https://github.com/ppy/osu
synced 2025-02-19 20:06:53 +00:00
Merge pull request #26695 from EVAST9919/rolling-counter-alloc
Reduce localisation overhead in `ScoreCounter`
This commit is contained in:
commit
254dcfcebc
@ -4,7 +4,6 @@
|
||||
#nullable disable
|
||||
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.LocalisationExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -39,7 +38,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
protected override double GetProportionalDuration(long currentValue, long newValue) =>
|
||||
currentValue > newValue ? currentValue - newValue : newValue - currentValue;
|
||||
|
||||
protected override LocalisableString FormatCount(long count) => count.ToLocalisableString(formatString);
|
||||
protected override LocalisableString FormatCount(long count) => count.ToString(formatString);
|
||||
|
||||
protected override OsuSpriteText CreateSpriteText()
|
||||
=> base.CreateSpriteText().With(s => s.Font = s.Font.With(fixedWidth: true));
|
||||
|
@ -33,7 +33,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
public bool UsesFixedAnchor { get; set; }
|
||||
|
||||
protected override LocalisableString FormatCount(long count) => count.ToLocalisableString();
|
||||
protected override LocalisableString FormatCount(long count) => count.ToString();
|
||||
|
||||
protected override IHasText CreateText() => scoreText = new ArgonScoreTextComponent(Anchor.TopRight, BeatmapsetsStrings.ShowScoreboardHeadersScore.ToUpper())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user