1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:43:04 +08:00

add Separator component in OsuMarkdownSeparator

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-05-06 17:17:14 +07:00
parent 7b43730fe6
commit 92022f2cba
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -4,23 +4,24 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers.Markdown; using osu.Framework.Graphics.Containers.Markdown;
using osu.Framework.Graphics.Shapes;
using osu.Game.Overlays; using osu.Game.Overlays;
namespace osu.Game.Graphics.Containers.Markdown namespace osu.Game.Graphics.Containers.Markdown
{ {
public class OsuMarkdownSeparator : MarkdownSeparator public class OsuMarkdownSeparator : MarkdownSeparator
{ {
private Drawable separator; protected override Drawable CreateSeparator() => new Separator();
[BackgroundDependencyLoader] private class Separator : Box
private void load(OverlayColourProvider colourProvider)
{ {
separator.Colour = colourProvider.Background3; [BackgroundDependencyLoader]
} private void load(OverlayColourProvider colourProvider)
{
protected override Drawable CreateSeparator() RelativeSizeAxes = Axes.X;
{ Height = 1;
return separator = base.CreateSeparator(); Colour = colourProvider.Background3;
}
} }
} }
} }