1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:18:22 +08:00

Fix legacy skin text reading from the wrong source

Regressed with ruleset legacy skin implementation.
This commit is contained in:
Dean Herbert 2019-08-31 12:23:15 +09:00
parent 49fb21ffa9
commit f89981e1a3

View File

@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
return !hasFont(font)
? null
: new LegacySpriteText(this, font)
: new LegacySpriteText(source, font)
{
// Spacing value was reverse-engineered from the ratio of the rendered sprite size in the visual inspector vs the actual texture size
Scale = new Vector2(0.96f),
@ -117,6 +117,6 @@ namespace osu.Game.Rulesets.Osu.Skinning
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration
=> configuration.Value is TConfiguration conf ? query.Invoke(conf) : default;
private bool hasFont(string fontName) => GetTexture($"{fontName}-0") != null;
private bool hasFont(string fontName) => source.GetTexture($"{fontName}-0") != null;
}
}