From bd66285bd47859569618a26eebbf2563d65d9f93 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 20 Sep 2023 12:59:40 +0900 Subject: [PATCH] Rename parameter on `LegacySpriteText` to better imply the maximum size is per glyph --- osu.Game/Skinning/LegacySpriteText.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Skinning/LegacySpriteText.cs b/osu.Game/Skinning/LegacySpriteText.cs index f021a99102..7eb92126fa 100644 --- a/osu.Game/Skinning/LegacySpriteText.cs +++ b/osu.Game/Skinning/LegacySpriteText.cs @@ -13,7 +13,7 @@ namespace osu.Game.Skinning public sealed partial class LegacySpriteText : OsuSpriteText { private readonly LegacyFont font; - private readonly Vector2? maxSize; + private readonly Vector2? maxSizePerGlyph; private LegacyGlyphStore glyphStore = null!; @@ -21,10 +21,10 @@ public sealed partial class LegacySpriteText : OsuSpriteText protected override char[] FixedWidthExcludeCharacters => new[] { ',', '.', '%', 'x' }; - public LegacySpriteText(LegacyFont font, Vector2? maxSize = null) + public LegacySpriteText(LegacyFont font, Vector2? maxSizePerGlyph = null) { this.font = font; - this.maxSize = maxSize; + this.maxSizePerGlyph = maxSizePerGlyph; Shadow = false; UseFullGlyphHeight = false; @@ -36,7 +36,7 @@ private void load(ISkinSource skin) Font = new FontUsage(skin.GetFontPrefix(font), 1, fixedWidth: true); Spacing = new Vector2(-skin.GetFontOverlap(font), 0); - glyphStore = new LegacyGlyphStore(skin, maxSize); + glyphStore = new LegacyGlyphStore(skin, maxSizePerGlyph); } protected override TextBuilder CreateTextBuilder(ITexturedGlyphLookupStore store) => base.CreateTextBuilder(glyphStore);