1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-21 05:49:54 +08:00

add main page in wiki overlay

This commit is contained in:
Gagah Pangeran Rosfatiputra
2021-05-25 14:20:04 +07:00
Unverified
parent 1109970278
commit ae0949fc14
+17 -6
View File
@@ -54,13 +54,24 @@ namespace osu.Game.Overlays
private void onSuccess(APIWikiPage response)
{
wikiData.Value = response;
LoadDisplay(new WikiMarkdownContainer
if (response.Layout == "main_page")
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
CurrentPath = $"{path.Value}/",
Text = response.Markdown,
});
LoadDisplay(new WikiMainPage
{
Markdown = response.Markdown
});
}
else
{
LoadDisplay(new WikiMarkdownContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
CurrentPath = $"{path.Value}/",
Text = response.Markdown,
});
}
}
private void showParentPage()