// 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.Framework.Graphics.UserInterface; using osu.Game.Graphics; using osuTK.Graphics; namespace osu.Game.Overlays { /// /// which contains . /// /// The type of item to be represented by tabs in . public abstract class ControllableOverlayHeader : OverlayHeader { private readonly Box controlBackground; protected ControllableOverlayHeader(OverlayColourScheme colourScheme) : base(colourScheme) { HeaderInfo.Add(new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { controlBackground = new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Gray, }, CreateTabControl().With(control => control.Margin = new MarginPadding { Left = UserProfileOverlay.CONTENT_X_MARGIN }) } }); } [BackgroundDependencyLoader] private void load(OsuColour colours) { controlBackground.Colour = colours.ForOverlayElement(ColourScheme, 0.2f, 0.2f); } protected abstract TabControl CreateTabControl(); } }