// 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.Graphics; using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.UserInterface; using osuTK.Graphics; namespace osu.Game.Overlays { /// The type of item to be represented by tabs in . public abstract class ControllableOverlayHeader : OverlayHeader { protected Color4 ControlBackgroundColour { set => controlBackground.Colour = value; } private readonly Box controlBackground; protected ControllableOverlayHeader() { 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 }) } }); } protected abstract TabControl CreateTabControl(); } }