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
|
|
|
|
|
|
2017-01-31 17:53:52 +08:00
|
|
|
|
using OpenTK;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-01-31 18:19:01 +08:00
|
|
|
|
using osu.Framework.Graphics.Primitives;
|
2017-01-31 17:53:52 +08:00
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
|
2016-11-03 12:45:16 +08:00
|
|
|
|
namespace osu.Game.Overlays.Options
|
|
|
|
|
{
|
2017-01-31 18:19:01 +08:00
|
|
|
|
public abstract class OptionsSubsection : FlowContainer
|
2016-11-03 12:45:16 +08:00
|
|
|
|
{
|
2016-11-07 20:17:29 +08:00
|
|
|
|
private Container<Drawable> content;
|
2016-11-07 20:13:56 +08:00
|
|
|
|
protected override Container<Drawable> Content => content;
|
2016-11-09 11:38:40 +08:00
|
|
|
|
|
2016-11-04 11:01:11 +08:00
|
|
|
|
protected abstract string Header { get; }
|
2016-11-09 11:38:40 +08:00
|
|
|
|
|
2016-11-03 12:45:16 +08:00
|
|
|
|
public OptionsSubsection()
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X;
|
|
|
|
|
AutoSizeAxes = Axes.Y;
|
2017-01-31 18:19:01 +08:00
|
|
|
|
Direction = FlowDirection.VerticalOnly;
|
2016-11-03 12:45:16 +08:00
|
|
|
|
AddInternal(new Drawable[]
|
|
|
|
|
{
|
2017-01-31 18:19:01 +08:00
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Text = Header.ToUpper(),
|
|
|
|
|
Margin = new MarginPadding { Bottom = 10 },
|
|
|
|
|
Font = @"Exo2.0-Black",
|
|
|
|
|
},
|
2016-11-03 12:45:16 +08:00
|
|
|
|
content = new FlowContainer
|
|
|
|
|
{
|
|
|
|
|
Direction = FlowDirection.VerticalOnly,
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
Spacing = new Vector2(0, 5),
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|