Add support to use legacy combo fonts for the counter on legacy skins

This commit is contained in:
Salman Ahmed
2020-08-03 21:40:13 +03:00
parent 9d10658e3c
commit 29053048ff
5 changed files with 18 additions and 4 deletions

View File

@ -94,7 +94,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
var font = GetConfig<OsuSkinConfiguration, string>(OsuSkinConfiguration.HitCirclePrefix)?.Value ?? "default";
var overlap = GetConfig<OsuSkinConfiguration, float>(OsuSkinConfiguration.HitCircleOverlap)?.Value ?? -2;
return !hasFont(font)
return !HasFont(font)
? null
: new LegacySpriteText(Source, font)
{
@ -145,7 +145,5 @@ namespace osu.Game.Rulesets.Osu.Skinning
return Source.GetConfig<TLookup, TValue>(lookup);
}
private bool hasFont(string fontName) => Source.GetTexture($"{fontName}-0") != null;
}
}