1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

add subtitle toc

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-06-04 11:12:42 +07:00
parent d8d4bf66b3
commit 41ec531bab
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -44,6 +44,10 @@ namespace osu.Game.Overlays.Wiki
case 2:
tableOfContents.Add(new TocTitle(title));
break;
case 3:
tableOfContents.Add(new TocTitle(title, true));
break;
}
}
@ -51,14 +55,14 @@ namespace osu.Game.Overlays.Wiki
{
private readonly OsuSpriteText spriteText;
public TocTitle(string text)
public TocTitle(string text, bool subtitle = false)
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Child = spriteText = new OsuSpriteText
{
Text = text,
Font = OsuFont.GetFont(size: 15),
Font = OsuFont.GetFont(size: subtitle ? 12 : 15),
};
}