1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 22:35:23 +08:00

Move gradient to be part of the background for now

This commit is contained in:
Dean Herbert 2021-08-23 15:26:39 +09:00
parent 58fb0c042b
commit 99bb3032a5
2 changed files with 10 additions and 14 deletions

View File

@ -3,10 +3,14 @@
using System.Threading; using System.Threading;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Online.Rooms; using osu.Game.Online.Rooms;
using osuTK; using osuTK;
using osuTK.Graphics;
#nullable enable #nullable enable
@ -20,6 +24,12 @@ namespace osu.Game.Screens.OnlinePlay.Components
protected OnlinePlayBackgroundScreen() protected OnlinePlayBackgroundScreen()
: base(false) : base(false)
{ {
AddInternal(new Box
{
RelativeSizeAxes = Axes.Both,
Depth = float.MinValue,
Colour = ColourInfo.GradientVertical(Color4.Black.Opacity(0.9f), Color4.Black.Opacity(0.6f))
});
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -1,26 +1,12 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Screens; using osu.Framework.Screens;
using osuTK.Graphics;
namespace osu.Game.Screens.OnlinePlay namespace osu.Game.Screens.OnlinePlay
{ {
public class OnlinePlaySubScreenStack : OsuScreenStack public class OnlinePlaySubScreenStack : OsuScreenStack
{ {
public OnlinePlaySubScreenStack()
{
AddInternal(new Box
{
RelativeSizeAxes = Axes.Both,
Colour = ColourInfo.GradientVertical(Color4.Black.Opacity(0.9f), Color4.Black.Opacity(0.6f))
});
}
protected override void ScreenChanged(IScreen prev, IScreen next) protected override void ScreenChanged(IScreen prev, IScreen next)
{ {
base.ScreenChanged(prev, next); base.ScreenChanged(prev, next);