1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-14 19:47:24 +08:00
osu-lazer/osu.Game/Overlays/Options/OptionsSubsection.cs

45 lines
1.3 KiB
C#
Raw Normal View History

2016-12-06 17:56:20 +08:00
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
namespace osu.Game.Overlays.Options
{
public abstract class OptionsSubsection : Container
{
2016-11-07 20:17:29 +08:00
private Container<Drawable> content;
protected override Container<Drawable> Content => content;
2016-11-09 11:38:40 +08:00
protected abstract string Header { get; }
2016-11-09 11:38:40 +08:00
public OptionsSubsection()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
AddInternal(new Drawable[]
{
content = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(0, 5),
Children = new[]
{
new SpriteText
{
2016-11-15 15:55:23 +08:00
TextSize = 17,
Text = Header.ToUpper(),
Font = @"Exo2.0-Black",
}
}
},
});
}
}
}