1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +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.Graphics;
using osu.Framework.Graphics.Containers.Markdown;
using osu.Framework.Graphics.Shapes;
using osu.Game.Overlays;
namespace osu.Game.Graphics.Containers.Markdown
{
public class OsuMarkdownSeparator : MarkdownSeparator
{
private Drawable separator;
protected override Drawable CreateSeparator() => new Separator();
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
private class Separator : Box
{
separator.Colour = colourProvider.Background3;
}
protected override Drawable CreateSeparator()
{
return separator = base.CreateSeparator();
[BackgroundDependencyLoader]
private void load(OverlayColourProvider colourProvider)
{
RelativeSizeAxes = Axes.X;
Height = 1;
Colour = colourProvider.Background3;
}
}
}
}