mirror of
https://github.com/ppy/osu
synced 2025-02-09 06:36:56 +00:00
add method AddToc
This commit is contained in:
parent
7e78150144
commit
b1b305c150
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user