add method AddToc

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-06-04 10:17:38 +07:00
parent 7e78150144
commit b1b305c150
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -3,6 +3,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Containers.Markdown;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
@ -32,5 +33,19 @@ namespace osu.Game.Overlays.Wiki
}
},
};
public void AddToc(string title, MarkdownHeading heading, int level)
{
switch (level)
{
case 2:
tableOfContents.Add(new OsuSpriteText
{
Text = title,
Font = OsuFont.GetFont(size: 15),
});
break;
}
}
}
}