2021-05-11 23:21:38 +00: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.
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2021-05-11 23:21:38 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
using osu.Game.Graphics.Containers;
|
|
|
|
using osu.Game.Overlays;
|
2022-05-24 09:02:37 +00:00
|
|
|
using osuTK;
|
2021-05-11 23:21:38 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit
|
|
|
|
{
|
2021-05-12 07:53:49 +00:00
|
|
|
public abstract class EditorRoundedScreenSettings : CompositeDrawable
|
2021-05-11 23:21:38 +00:00
|
|
|
{
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OverlayColourProvider colours)
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
|
|
|
|
InternalChildren = new Drawable[]
|
|
|
|
{
|
|
|
|
new Box
|
|
|
|
{
|
2022-05-24 09:02:37 +00:00
|
|
|
Colour = colours.Background6,
|
2021-05-11 23:21:38 +00:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
},
|
|
|
|
new OsuScrollContainer
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Child = new FillFlowContainer
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
Direction = FillDirection.Vertical,
|
2022-05-24 09:02:37 +00:00
|
|
|
Padding = new MarginPadding(10),
|
|
|
|
Spacing = new Vector2(10),
|
2021-05-11 23:21:38 +00:00
|
|
|
Children = CreateSections()
|
|
|
|
},
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
protected abstract IReadOnlyList<Drawable> CreateSections();
|
|
|
|
}
|
|
|
|
}
|