mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Rename parameter on LegacySpriteText
to better imply the maximum size is per glyph
This commit is contained in:
parent
8e16b1d507
commit
bd66285bd4
@ -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 @@ namespace osu.Game.Skinning
|
||||
|
||||
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 @@ namespace osu.Game.Skinning
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user