Refactor OverlayHeader hierarchy

This commit is contained in:
Andrei Zavatski
2020-01-21 06:00:12 +03:00
parent 178a72f9b8
commit 30edd80c8c
8 changed files with 67 additions and 97 deletions

View File

@ -1,7 +1,6 @@
// 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.UserInterface;
using osu.Game.Graphics;
@ -9,23 +8,15 @@ using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays
{
public abstract class BreadcrumbControlOverlayHeader : ControllableOverlayHeader<string>
public abstract class BreadcrumbControlOverlayHeader : TabControlOverlayHeader<string>
{
protected OverlayHeaderBreadcrumbControl BreadcrumbControl;
protected override TabControl<string> CreateTabControl() => BreadcrumbControl = new OverlayHeaderBreadcrumbControl();
protected override OsuTabControl<string> CreateTabControl() => new OverlayHeaderBreadcrumbControl();
protected BreadcrumbControlOverlayHeader(OverlayColourScheme colourScheme)
: base(colourScheme)
{
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
BreadcrumbControl.AccentColour = colours.ForOverlayElement(ColourScheme, 1, 0.75f);
}
public class OverlayHeaderBreadcrumbControl : BreadcrumbControl<string>
{
public OverlayHeaderBreadcrumbControl()