mirror of
https://github.com/ppy/osu.git
synced 2025-02-26 22:43:21 +08:00
Add support for the HitCircleOverlap property in legacy skins
This commit is contained in:
parent
e9709e82b8
commit
38cf5a1ea4
@ -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);
|
||||
|
@ -46,6 +46,9 @@ namespace osu.Game.Skinning
|
||||
case "HitCirclePrefix":
|
||||
skin.HitCircleFont = pair.Value;
|
||||
break;
|
||||
case "HitCircleOverlap":
|
||||
skin.HitCircleOverlap = int.Parse(pair.Value);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -22,6 +22,7 @@ namespace osu.Game.Skinning
|
||||
public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
|
||||
|
||||
public string HitCircleFont { get; set; } = "default";
|
||||
public int HitCircleOverlap { get; set; }
|
||||
|
||||
public bool? CursorExpand { get; set; } = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user