1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-26 23:22:55 +08:00

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
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
3 changed files with 12 additions and 1 deletions

View File

@ -58,7 +58,14 @@ namespace osu.Game.Skinning
componentName = "hit300"; componentName = "hit300";
break; break;
case "Play/osu/number-text": 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); var texture = GetTexture(componentName);

View File

@ -46,6 +46,9 @@ namespace osu.Game.Skinning
case "HitCirclePrefix": case "HitCirclePrefix":
skin.HitCircleFont = pair.Value; skin.HitCircleFont = pair.Value;
break; break;
case "HitCircleOverlap":
skin.HitCircleOverlap = int.Parse(pair.Value);
break;
} }
break; break;

View File

@ -22,6 +22,7 @@ namespace osu.Game.Skinning
public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>(); public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
public string HitCircleFont { get; set; } = "default"; public string HitCircleFont { get; set; } = "default";
public int HitCircleOverlap { get; set; }
public bool? CursorExpand { get; set; } = true; public bool? CursorExpand { get; set; } = true;
} }