mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Merge pull request #10388 from peppy/editor-setup-placeholder-text
Add placeholder text/colour when no beatmap background is specified yet
This commit is contained in:
commit
e2d081e3cc
@ -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);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user