mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 12:58:01 +09:00
make scaling container background use BackgroundScreenStack with BackgroundScreenDefault
This commit is contained in:
parent
06fd735190
commit
01ce8f161e
@ -6,7 +6,8 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Graphics.Backgrounds;
|
using osu.Game.Screens;
|
||||||
|
using osu.Game.Screens.Backgrounds;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Containers
|
namespace osu.Game.Graphics.Containers
|
||||||
@ -32,7 +33,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
private readonly Container sizableContainer;
|
private readonly Container sizableContainer;
|
||||||
|
|
||||||
private Drawable backgroundLayer;
|
private BackgroundScreenStack backgroundLayer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a new instance.
|
/// Create a new instance.
|
||||||
@ -118,7 +119,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
if (requiresBackgroundVisible)
|
if (requiresBackgroundVisible)
|
||||||
{
|
{
|
||||||
if (backgroundLayer == null)
|
if (backgroundLayer == null)
|
||||||
LoadComponentAsync(backgroundLayer = new Background("Menu/menu-background-1")
|
LoadComponentAsync(backgroundLayer = new BackgroundScreenStack()
|
||||||
{
|
{
|
||||||
Colour = OsuColour.Gray(0.1f),
|
Colour = OsuColour.Gray(0.1f),
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
@ -126,6 +127,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
}, d =>
|
}, d =>
|
||||||
{
|
{
|
||||||
AddInternal(d);
|
AddInternal(d);
|
||||||
|
d.Push(new BackgroundScreenDefault());
|
||||||
d.FadeTo(requiresBackgroundVisible ? 1 : 0, 4000, Easing.OutQuint);
|
d.FadeTo(requiresBackgroundVisible ? 1 : 0, 4000, Easing.OutQuint);
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user