Make OverlayHeader use colour schemes

This commit is contained in:
Andrei Zavatski
2020-01-15 22:41:22 +03:00
parent 02af546d3c
commit 476717e181
6 changed files with 45 additions and 56 deletions

View File

@ -1,6 +1,7 @@
// 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.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface;
@ -15,6 +16,17 @@ namespace osu.Game.Overlays
protected override TabControl<string> CreateTabControl() => TabControl = new OverlayHeaderTabControl();
protected TabControlOverlayHeader(OverlayColourScheme colourScheme)
: base(colourScheme)
{
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
TabControl.AccentColour = colours.ForOverlayElement(ColourScheme, 1, 0.75f);
}
public class OverlayHeaderTabControl : OverlayTabControl<string>
{
public OverlayHeaderTabControl()