A game framework written with osu! in mind.
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2// See the LICENCE file in the repository root for full licence text.
3
4using osu.Framework.Allocation;
5using osu.Framework.Graphics.Shapes;
6using osuTK.Graphics;
7
8namespace osu.Framework.Graphics.Containers.Markdown
9{
10 /// <summary>
11 /// Visualises a horizontal separator.
12 /// </summary>
13 /// <code>
14 /// ---
15 /// </code>
16 public class MarkdownSeparator : CompositeDrawable
17 {
18 public MarkdownSeparator()
19 {
20 AutoSizeAxes = Axes.Y;
21 RelativeSizeAxes = Axes.X;
22 }
23
24 [BackgroundDependencyLoader]
25 private void load()
26 {
27 InternalChild = CreateSeparator();
28 }
29
30 protected virtual Drawable CreateSeparator() => new Box
31 {
32 RelativeSizeAxes = Axes.X,
33 Height = 1,
34 Colour = Color4.Gray,
35 };
36 }
37}