mirror of
https://github.com/ppy/osu.git
synced 2025-03-06 04:33:21 +08:00
change OsuMarkdownListItem to composite drawable
This commit is contained in:
parent
1e8b3f3a8c
commit
010c51e6ed
@ -26,7 +26,7 @@ namespace osu.Game.Graphics.Containers.Markdown
|
||||
var childContainer = CreateListItem(listItemBlock);
|
||||
container.Add(childContainer);
|
||||
foreach (var single in listItemBlock)
|
||||
base.AddMarkdownComponent(single, childContainer, level);
|
||||
base.AddMarkdownComponent(single, childContainer.Content, level);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -7,18 +7,28 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Graphics.Containers.Markdown
|
||||
{
|
||||
public class OsuMarkdownListItem : FillFlowContainer
|
||||
public class OsuMarkdownListItem : CompositeDrawable
|
||||
{
|
||||
private const float default_left_padding = 20;
|
||||
|
||||
public FillFlowContainer Content { get; }
|
||||
|
||||
public OsuMarkdownListItem()
|
||||
{
|
||||
AutoSizeAxes = Axes.Y;
|
||||
RelativeSizeAxes = Axes.X;
|
||||
|
||||
Direction = FillDirection.Vertical;
|
||||
Spacing = new Vector2(10, 10);
|
||||
Padding = new MarginPadding { Left = default_left_padding };
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
Content = new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(10, 10),
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user