2017-02-07 12:59:30 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2017-02-07 12:52:19 +08:00
|
|
|
|
|
|
|
|
|
using OpenTK;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Primitives;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Options
|
|
|
|
|
{
|
|
|
|
|
public abstract class OptionsSubsection : FlowContainer
|
|
|
|
|
{
|
|
|
|
|
private Container<Drawable> content;
|
|
|
|
|
protected override Container<Drawable> Content => content;
|
|
|
|
|
|
|
|
|
|
protected abstract string Header { get; }
|
|
|
|
|
|
|
|
|
|
public OptionsSubsection()
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X;
|
|
|
|
|
AutoSizeAxes = Axes.Y;
|
|
|
|
|
Direction = FlowDirection.VerticalOnly;
|
|
|
|
|
AddInternal(new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Text = Header.ToUpper(),
|
|
|
|
|
Margin = new MarginPadding { Bottom = 10 },
|
|
|
|
|
Font = @"Exo2.0-Black",
|
|
|
|
|
},
|
|
|
|
|
content = new FlowContainer
|
|
|
|
|
{
|
|
|
|
|
Direction = FlowDirection.VerticalOnly,
|
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
|
Spacing = new Vector2(0, 5),
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|