mirror of https://github.com/ppy/osu
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 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue