// Copyright (c) ppy Pty Ltd . 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; using osu.Framework.Graphics.Shapes; using osu.Game.Graphics.Containers; using osu.Game.Overlays; namespace osu.Game.Screens.Edit.Components { /// /// A sidebar area that can be attached to the left or right edge of the screen. /// Houses scrolling sectionised content. /// internal partial class EditorSidebar : Container { public const float WIDTH = 250; public const float PADDING = 3; private readonly Box background; protected override Container Content { get; } public EditorSidebar() { Width = WIDTH; RelativeSizeAxes = Axes.Y; InternalChildren = new Drawable[] { background = new Box { RelativeSizeAxes = Axes.Both, }, new OsuScrollContainer { ScrollbarOverlapsContent = false, RelativeSizeAxes = Axes.Both, Child = Content = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding(PADDING), Direction = FillDirection.Vertical, }, } }; } [BackgroundDependencyLoader] private void load(OverlayColourProvider colourProvider) { background.Colour = colourProvider.Background5; } } }