2022-03-11 14:30:46 +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
|
|
|
|
|
2022-03-15 08:41:20 +00:00
|
|
|
using System.Linq;
|
2022-03-11 14:30:46 +00:00
|
|
|
using osu.Framework.Graphics;
|
2022-03-15 07:36:04 +00:00
|
|
|
using osu.Framework.Graphics.Containers;
|
2022-03-15 08:41:20 +00:00
|
|
|
using osu.Game.Configuration;
|
2022-03-15 07:36:04 +00:00
|
|
|
using osu.Game.Screens.Edit.Components;
|
2022-03-11 14:30:46 +00:00
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Skinning.Editor
|
|
|
|
{
|
2022-03-15 07:36:04 +00:00
|
|
|
internal class SkinSettingsToolbox : EditorSidebarSection
|
2022-03-11 14:30:46 +00:00
|
|
|
{
|
2022-03-15 07:36:04 +00:00
|
|
|
protected override Container<Drawable> Content { get; }
|
2022-03-11 14:30:46 +00:00
|
|
|
|
2022-03-15 08:41:20 +00:00
|
|
|
public SkinSettingsToolbox(Drawable component)
|
|
|
|
: base($"Settings ({component.GetType().Name})")
|
2022-03-11 14:30:46 +00:00
|
|
|
{
|
2022-03-15 07:36:04 +00:00
|
|
|
base.Content.Add(Content = new FillFlowContainer
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
Spacing = new Vector2(10),
|
2022-03-15 08:41:20 +00:00
|
|
|
Children = component.CreateSettingsControls().ToArray()
|
2022-03-15 07:36:04 +00:00
|
|
|
});
|
2022-03-11 14:30:46 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|