mirror of
https://github.com/ppy/osu
synced 2025-01-10 08:09:40 +00:00
add order in OsuMarkdownListItem for ordered list
This commit is contained in:
parent
1582b0da88
commit
2a3479f30d
@ -50,7 +50,7 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
Padding = new MarginPadding(0)
|
||||
};
|
||||
|
||||
protected virtual OsuMarkdownListItem CreateListItem(ListItemBlock listItemBlock, int level) => new OsuMarkdownListItem(level);
|
||||
protected virtual OsuMarkdownListItem CreateListItem(ListItemBlock listItemBlock, int level) => new OsuMarkdownListItem(level, listItemBlock.Order);
|
||||
|
||||
protected override MarkdownPipeline CreateBuilder()
|
||||
=> new MarkdownPipelineBuilder().UseAutoIdentifiers(AutoIdentifierOptions.GitHub)
|
||||
|
@ -12,6 +12,8 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
public class OsuMarkdownListItem : CompositeDrawable
|
||||
{
|
||||
private readonly int level;
|
||||
private readonly int order;
|
||||
private readonly bool isOrdered;
|
||||
private const float default_left_padding = 20;
|
||||
|
||||
[Resolved]
|
||||
@ -19,9 +21,11 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
|
||||
public FillFlowContainer Content { get; }
|
||||
|
||||
public OsuMarkdownListItem(int level)
|
||||
public OsuMarkdownListItem(int level, int order)
|
||||
{
|
||||
this.level = level;
|
||||
this.order = order;
|
||||
isOrdered = order != 0;
|
||||
|
||||
AutoSizeAxes = Axes.Y;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
Loading…
Reference in New Issue
Block a user