mirror of
https://github.com/ppy/osu
synced 2025-01-11 16:49:39 +00:00
Implement HitCircleFont skin configuration
This commit is contained in:
parent
0d8276c5f8
commit
8191f03503
@ -57,8 +57,7 @@ namespace osu.Game.Skinning
|
|||||||
componentName = "hit300";
|
componentName = "hit300";
|
||||||
break;
|
break;
|
||||||
case "Play/osu/number-text":
|
case "Play/osu/number-text":
|
||||||
// Todo: Not necessarily default font
|
return hasFont(Configuration.HitCircleFont) ? new LegacySpriteText(Textures, Configuration.HitCircleFont) : null;
|
||||||
return hasFont("default") ? new LegacySpriteText(Textures, "default") : null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var texture = GetTexture(componentName);
|
var texture = GetTexture(componentName);
|
||||||
|
@ -19,6 +19,7 @@ namespace osu.Game.Skinning
|
|||||||
switch (section)
|
switch (section)
|
||||||
{
|
{
|
||||||
case Section.General:
|
case Section.General:
|
||||||
|
{
|
||||||
var pair = SplitKeyVal(line);
|
var pair = SplitKeyVal(line);
|
||||||
|
|
||||||
switch (pair.Key)
|
switch (pair.Key)
|
||||||
@ -32,6 +33,20 @@ namespace osu.Game.Skinning
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
case Section.Fonts:
|
||||||
|
{
|
||||||
|
var pair = SplitKeyVal(line);
|
||||||
|
|
||||||
|
switch (pair.Key)
|
||||||
|
{
|
||||||
|
case "HitCirclePrefix":
|
||||||
|
skin.HitCircleFont = pair.Value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.ParseLine(skin, section, line);
|
base.ParseLine(skin, section, line);
|
||||||
|
@ -14,5 +14,7 @@ namespace osu.Game.Skinning
|
|||||||
public List<Color4> ComboColours { get; set; } = new List<Color4>();
|
public List<Color4> ComboColours { get; set; } = new List<Color4>();
|
||||||
|
|
||||||
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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user