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;
|
2024-08-28 18:17:39 +08:00
|
|
|
using osu.Game.Graphics.UserInterface;
|
2021-06-08 23:14:26 +08:00
|
|
|
using osu.Game.Graphics.UserInterfaceV2;
|
2020-10-06 14:17:15 +08:00
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit.Setup
|
|
|
|
{
|
2021-08-22 22:40:17 +08:00
|
|
|
public abstract partial class SetupSection : Container
|
2020-10-06 14:17:15 +08:00
|
|
|
{
|
2023-01-14 07:24:28 +08:00
|
|
|
private FillFlowContainer flow = null!;
|
2020-10-06 14:17:15 +08:00
|
|
|
|
2021-06-08 23:14:26 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Used to align some of the child <see cref="LabelledDrawable{T}"/>s together to achieve a grid-like look.
|
|
|
|
/// </summary>
|
|
|
|
protected const float LABEL_WIDTH = 160;
|
|
|
|
|
2020-10-06 14:17:15 +08:00
|
|
|
[Resolved]
|
2023-01-14 07:24:28 +08:00
|
|
|
protected OsuColour Colours { get; private set; } = null!;
|
2020-10-06 14:17:15 +08:00
|
|
|
|
|
|
|
[Resolved]
|
2023-01-14 07:24:28 +08:00
|
|
|
protected EditorBeatmap Beatmap { get; private set; } = null!;
|
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; }
|
|
|
|
|
2021-08-22 22:40:17 +08:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
2020-10-06 14:17:15 +08:00
|
|
|
{
|
|
|
|
AutoSizeAxes = Axes.Y;
|
|
|
|
|
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,
|
2024-08-28 18:17:39 +08:00
|
|
|
Spacing = new Vector2(10),
|
2020-10-06 14:17:15 +08:00
|
|
|
Direction = FillDirection.Vertical,
|
2021-04-04 01:02:33 +08:00
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
2024-08-28 18:17:39 +08:00
|
|
|
new SectionHeader(Title)
|
2021-04-04 01:02:33 +08:00
|
|
|
{
|
2024-08-28 18:17:39 +08:00
|
|
|
Margin = new MarginPadding { Left = 9, },
|
2021-04-04 01:02:33 +08:00
|
|
|
},
|
|
|
|
flow = new FillFlowContainer
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
2024-08-28 18:17:39 +08:00
|
|
|
Spacing = new Vector2(5),
|
2021-04-04 01:02:33 +08:00
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
}
|
|
|
|
}
|
2020-10-06 14:17:15 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|