1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00

Merge branch 'master' into labelled-slider-bar-2020

This commit is contained in:
Dan Balasescu 2020-10-06 18:29:20 +09:00 committed by GitHub
commit 4036412387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,8 +59,11 @@ namespace osu.Game.Screens.Edit.Setup
{
}
[Resolved]
private OsuColour colours { get; set; }
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load()
{
Container audioTrackFileChooserContainer = new Container
{
@ -187,7 +190,27 @@ namespace osu.Game.Screens.Edit.Setup
FillMode = FillMode.Fill,
}, background =>
{
backgroundSpriteContainer.Child = background;
if (background.Texture != null)
backgroundSpriteContainer.Child = background;
else
{
backgroundSpriteContainer.Children = new Drawable[]
{
new Box
{
Colour = colours.GreySeafoamDarker,
RelativeSizeAxes = Axes.Both,
},
new OsuTextFlowContainer(t => t.Font = OsuFont.Default.With(size: 24))
{
Text = "Drag image here to set beatmap background!",
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
AutoSizeAxes = Axes.X,
}
};
}
background.FadeInFromZero(500);
});
}