use ListBlock IsOrdered to determine ordered or unordered list

This commit is contained in:
Gagah Pangeran Rosfatiputra
2021-04-30 11:48:37 +07:00
parent 11d0f12455
commit fc4fa4f696
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
// 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.Syntax;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -23,11 +24,11 @@ namespace osu.Game.Graphics.Containers.Markdown
public FillFlowContainer Content { get; }
public OsuMarkdownListItem(int level, int order)
public OsuMarkdownListItem(ListItemBlock listItemBlock, int level)
{
this.level = level;
this.order = order;
isOrdered = order != 0;
this.order = listItemBlock.Order;
isOrdered = ((ListBlock)listItemBlock.Parent).IsOrdered;
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;