1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 19:27:31 +08:00
osu-lazer/osu.Game/Overlays/Wiki/Markdown/WikiNoticeContainer.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2021-05-21 17:04:08 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using Markdig.Extensions.Yaml;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Overlays.Wiki.Markdown
{
public class WikiNoticeContainer : FillFlowContainer
{
2021-05-21 17:05:37 +08:00
private readonly bool isOutdated;
private readonly bool needsCleanup;
2021-05-21 17:04:08 +08:00
public WikiNoticeContainer(YamlFrontMatterBlock yamlFrontMatterBlock)
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FillDirection.Vertical;
2021-05-21 17:05:37 +08:00
foreach (var line in yamlFrontMatterBlock.Lines)
{
switch (line.ToString())
{
case "outdated: true":
isOutdated = true;
break;
case "needs_cleanup: true":
needsCleanup = true;
break;
}
}
2021-05-21 17:04:08 +08:00
}
}
}