2021-04-30 13:37:49 +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.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Graphics.Containers;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Edit
|
|
|
|
{
|
2022-01-06 20:10:45 +08:00
|
|
|
public class ScrollingToolboxGroup : EditorToolboxGroup
|
2021-04-30 13:37:49 +08:00
|
|
|
{
|
|
|
|
protected readonly OsuScrollContainer Scroll;
|
|
|
|
|
2022-03-11 22:30:46 +08:00
|
|
|
protected readonly FillFlowContainer FillFlow;
|
|
|
|
|
2021-04-30 13:37:49 +08:00
|
|
|
protected override Container<Drawable> Content { get; }
|
|
|
|
|
|
|
|
public ScrollingToolboxGroup(string title, float scrollAreaHeight)
|
|
|
|
: base(title)
|
|
|
|
{
|
|
|
|
base.Content.Add(Scroll = new OsuScrollContainer
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
Height = scrollAreaHeight,
|
2022-03-11 22:30:46 +08:00
|
|
|
Child = Content = FillFlow = new FillFlowContainer
|
2021-04-30 13:37:49 +08:00
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
AutoSizeAxes = Axes.Y,
|
|
|
|
Direction = FillDirection.Vertical,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|