mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 02:27:25 +08:00
a7306248d1
An abstraction for OverlayHeaderTabControl
30 lines
858 B
C#
30 lines
858 B
C#
// 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.UserInterface;
|
|
using osu.Game.Graphics;
|
|
|
|
namespace osu.Game.Overlays
|
|
{
|
|
public class OverlayHeaderTabControl : OverlayTabControl<string>
|
|
{
|
|
protected override TabItem<string> CreateTabItem(string value) => new OverlayHeaderTabItem(value);
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(OsuColour colours)
|
|
{
|
|
AccentColour = colours.Seafoam;
|
|
}
|
|
|
|
private class OverlayHeaderTabItem : OverlayTabItem<string>
|
|
{
|
|
public OverlayHeaderTabItem(string value)
|
|
: base(value)
|
|
{
|
|
Text.Text = value;
|
|
}
|
|
}
|
|
}
|
|
}
|