1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-26 23:03:21 +08:00
osu-lazer/osu.Game/Graphics/Containers/Markdown/Footnotes/OsuMarkdownFootnote.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
1.0 KiB
C#
Raw Normal View History

2022-12-17 04:26:13 +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.Footnotes;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers.Markdown;
using osu.Framework.Graphics.Containers.Markdown.Footnotes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
namespace osu.Game.Graphics.Containers.Markdown.Footnotes
{
public partial class OsuMarkdownFootnote : MarkdownFootnote
{
public OsuMarkdownFootnote(Footnote footnote)
: base(footnote)
{
}
public override SpriteText CreateOrderMarker(int order) => CreateSpriteText().With(marker =>
{
marker.Text = LocalisableString.Format("{0}.", order);
});
public override MarkdownTextFlowContainer CreateTextFlow() => base.CreateTextFlow().With(textFlow =>
{
textFlow.Margin = new MarginPadding { Left = 30 };
});
}
}