Add support for the HitCircleOverlap property in legacy skins

This commit is contained in:
Jamie Taylor
2019-02-15 21:03:06 +09:00
parent e9709e82b8
commit 38cf5a1ea4
3 changed files with 12 additions and 1 deletions

View File

@ -58,7 +58,14 @@ namespace osu.Game.Skinning
componentName = "hit300";
break;
case "Play/osu/number-text":
return !hasFont(Configuration.HitCircleFont) ? null : new LegacySpriteText(Textures, Configuration.HitCircleFont) { Scale = new Vector2(0.96f) };
return !hasFont(Configuration.HitCircleFont)
? null
: new LegacySpriteText(Textures, Configuration.HitCircleFont)
{
Scale = new Vector2(0.96f),
// Spacing value was reverse-engineered from the ratio of the rendered sprite size in the visual inspector vs the actual texture size
Spacing = new Vector2(-Configuration.HitCircleOverlap * 0.89f, 0)
};
}
var texture = GetTexture(componentName);