mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Merge master with conflicts resolved
This commit is contained in:
@ -2,9 +2,11 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -14,20 +16,21 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
private readonly Box titleBackground;
|
||||
private readonly Container background;
|
||||
protected readonly FillFlowContainer HeaderInfo;
|
||||
private readonly ScreenTitle title;
|
||||
|
||||
protected Color4 TitleBackgroundColour
|
||||
{
|
||||
set => titleBackground.Colour = value;
|
||||
}
|
||||
protected readonly FillFlowContainer HeaderInfo;
|
||||
|
||||
protected float BackgroundHeight
|
||||
{
|
||||
set => background.Height = value;
|
||||
}
|
||||
|
||||
protected OverlayHeader()
|
||||
protected OverlayColourScheme ColourScheme { get; }
|
||||
|
||||
protected OverlayHeader(OverlayColourScheme colourScheme)
|
||||
{
|
||||
ColourScheme = colourScheme;
|
||||
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
@ -64,7 +67,7 @@ namespace osu.Game.Overlays
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Gray,
|
||||
},
|
||||
CreateTitle().With(title =>
|
||||
title = CreateTitle().With(title =>
|
||||
{
|
||||
title.Margin = new MarginPadding
|
||||
{
|
||||
@ -81,6 +84,13 @@ namespace osu.Game.Overlays
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
titleBackground.Colour = colours.ForOverlayElement(ColourScheme, 0.2f, 0.15f);
|
||||
title.AccentColour = colours.ForOverlayElement(ColourScheme, 1, 0.7f);
|
||||
}
|
||||
|
||||
protected abstract Drawable CreateBackground();
|
||||
|
||||
[NotNull]
|
||||
|
Reference in New Issue
Block a user