mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Explicitly associate setup sections with titles
This commit is contained in:
@ -4,12 +4,14 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Setup
|
||||
{
|
||||
internal class SetupSection : Container
|
||||
internal abstract class SetupSection : Container
|
||||
{
|
||||
private readonly FillFlowContainer flow;
|
||||
|
||||
@ -21,23 +23,40 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
|
||||
protected override Container<Drawable> Content => flow;
|
||||
|
||||
public SetupSection()
|
||||
public abstract LocalisableString Title { get; }
|
||||
|
||||
protected SetupSection()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
Padding = new MarginPadding(10);
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
Vertical = 10,
|
||||
Horizontal = 90
|
||||
};
|
||||
|
||||
InternalChild = flow = new FillFlowContainer
|
||||
InternalChild = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(20),
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
Horizontal = 90
|
||||
},
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(weight: FontWeight.Bold),
|
||||
Text = Title
|
||||
},
|
||||
flow = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Spacing = new Vector2(20),
|
||||
Direction = FillDirection.Vertical,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user