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:
parent
7b43730fe6
commit
92022f2cba
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user