2020-10-06 14:17:15 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2021-04-04 01:02:33 +08:00
|
|
|
using osu.Framework.Localisation;
|
2020-10-06 14:17:15 +08:00
|
|
|
using osu.Game.Graphics;
|
2021-04-04 01:02:33 +08:00
|
|
|
using osu.Game.Graphics.Sprites;
|
2020-10-06 14:17:15 +08:00
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Setup
|
|
|
|
{
|
2021-04-04 01:02:33 +08:00
|
|
|
internal abstract class SetupSection : Container
|
2020-10-06 14:17:15 +08:00
|
|
|
{
|
2020-10-06 18:26:57 +08:00
|
|
|
private readonly FillFlowContainer flow;
|
2020-10-06 14:17:15 +08:00
|
|
|
|
|
|
|
[Resolved]
|
|
|
|
protected OsuColour Colours { get; private set; }
|
|
|
|
|
|
|
|
[Resolved]
|
2021-01-04 15:47:08 +08:00
|
|
|
protected EditorBeatmap Beatmap { get; private set; }
|
2020-10-06 14:17:15 +08:00
|
|
|
|
2020-10-06 18:26:57 +08:00
|
|
|
protected override Container<Drawable> Content => flow;
|
2020-10-06 14:17:15 +08:00
|
|
|
|
2021-04-04 01:02:33 +08:00
|
|
|
public abstract LocalisableString Title { get; }
|
|
|
|
|
|
|
|
protected SetupSection()
|
2020-10-06 14:17:15 +08:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X;
|
|
|
|
AutoSizeAxes = Axes.Y;
|
|
|
|
|
2021-04-04 01:02:33 +08:00
|
|
|
Padding = new MarginPadding
|
|
|
|
{
|
|
|
|
Vertical = 10,
|
2021-04-19 12:57:46 +08:00
|
|
|
Horizontal = RoundedContentEditorScreen.HORIZONTAL_PADDING
|
2021-04-04 01:02:33 +08:00
|
|
|
};
|
2020-10-06 14:17:15 +08:00
|
|
|
|
2021-04-04 01:02:33 +08:00
|
|
|
InternalChild = new FillFlowContainer
|
2020-10-06 14:17:15 +08:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
Spacing = new Vector2(20),
|
|
|
|
Direction = FillDirection.Vertical,
|
2021-04-04 01:02:33 +08:00
|
|
|
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,
|
|
|
|
}
|
|
|
|
}
|
2020-10-06 14:17:15 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|