1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 05:27:40 +08:00
osu-lazer/osu.Game/Overlays/Options/OptionsSubsection.cs

45 lines
1.4 KiB
C#
Raw Normal View History

// 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.Game.Graphics.Sprites;
namespace osu.Game.Overlays.Options
{
2017-03-02 02:33:01 +08:00
public abstract class OptionsSubsection : FillFlowContainer
2017-02-07 12:52:19 +08:00
{
protected override Container<Drawable> Content => content;
private Container<Drawable> content;
2017-02-07 12:52:19 +08:00
protected abstract string Header { get; }
2017-03-09 13:01:08 +08:00
protected OptionsSubsection()
2017-02-07 12:52:19 +08:00
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
2017-03-04 18:00:17 +08:00
Direction = FillDirection.Vertical;
2017-02-07 12:52:19 +08:00
AddInternal(new Drawable[]
{
new OsuSpriteText
{
Text = Header.ToUpper(),
Margin = new MarginPadding { Bottom = 10 },
Font = @"Exo2.0-Black",
},
content = new FillFlowContainer
2017-02-07 12:52:19 +08:00
{
2017-03-04 18:00:17 +08:00
Direction = FillDirection.Vertical,
2017-03-02 02:33:01 +08:00
Spacing = new Vector2(0, 5),
2017-02-07 12:52:19 +08:00
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
},
});
}
}
}