Merge master with conflicts resolved

This commit is contained in:
Andrei Zavatski
2020-01-20 08:52:03 +03:00
211 changed files with 1841 additions and 425 deletions

View File

@ -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]