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:
parent
e9709e82b8
commit
38cf5a1ea4
@ -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);
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user