1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-31 23:50:29 +08:00

Implement HitCircleFont skin configuration

This commit is contained in:
smoogipoo
2018-09-27 17:27:24 +09:00
Unverified
parent 0d8276c5f8
commit 8191f03503
3 changed files with 18 additions and 2 deletions
+1 -2
View File
@@ -57,8 +57,7 @@ namespace osu.Game.Skinning
componentName = "hit300";
break;
case "Play/osu/number-text":
// Todo: Not necessarily default font
return hasFont("default") ? new LegacySpriteText(Textures, "default") : null;
return hasFont(Configuration.HitCircleFont) ? new LegacySpriteText(Textures, Configuration.HitCircleFont) : null;
}
var texture = GetTexture(componentName);
+15
View File
@@ -19,6 +19,7 @@ namespace osu.Game.Skinning
switch (section)
{
case Section.General:
{
var pair = SplitKeyVal(line);
switch (pair.Key)
@@ -32,6 +33,20 @@ namespace osu.Game.Skinning
}
break;
}
case Section.Fonts:
{
var pair = SplitKeyVal(line);
switch (pair.Key)
{
case "HitCirclePrefix":
skin.HitCircleFont = pair.Value;
break;
}
break;
}
}
base.ParseLine(skin, section, line);
+2
View File
@@ -14,5 +14,7 @@ namespace osu.Game.Skinning
public List<Color4> ComboColours { get; set; } = new List<Color4>();
public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
public string HitCircleFont { get; set; } = "default";
}
}