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