2016-11-08 10:28:06 +08:00
|
|
|
|
using OpenTK;
|
2016-11-03 12:45:16 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Options
|
|
|
|
|
{
|
2016-11-04 11:01:11 +08:00
|
|
|
|
public abstract class OptionsSubsection : Container
|
2016-11-03 12:45:16 +08:00
|
|
|
|
{
|
|
|
|
|
private Container content;
|
|
|
|
|
protected override Container Content => content;
|
|
|
|
|
|
2016-11-04 11:01:11 +08:00
|
|
|
|
protected abstract string Header { get; }
|
2016-11-03 12:45:16 +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[]
|
|
|
|
|
{
|
2016-11-04 11:01:11 +08:00
|
|
|
|
new SpriteText
|
2016-11-03 12:45:16 +08:00
|
|
|
|
{
|
|
|
|
|
TextSize = 25,
|
2016-11-04 11:01:11 +08:00
|
|
|
|
Text = Header,
|
2016-11-03 12:45:16 +08:00
|
|
|
|
// TODO: Bold
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|