mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 09:42:57 +08:00
Add screen to perform bundled beatmap downloads
This commit is contained in:
parent
99d2d7b805
commit
b042f1cad5
47
osu.Game/Overlays/FirstRunSetup/ScreenBundledBeatmaps.cs
Normal file
47
osu.Game/Overlays/FirstRunSetup/ScreenBundledBeatmaps.cs
Normal file
@ -0,0 +1,47 @@
|
||||
// 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.
|
||||
|
||||
using System.ComponentModel;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Beatmaps.Drawables;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.FirstRunSetup
|
||||
{
|
||||
[Description("Bundled Beatmaps")]
|
||||
public class ScreenBundledBeatmaps : FirstRunSetupScreen
|
||||
{
|
||||
private TriangleButton downloadButton;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Content.Children = new Drawable[]
|
||||
{
|
||||
new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: 20))
|
||||
{
|
||||
Text = "osu! doesn't come with any beatmaps pre-loaded. To get started, we have some recommended beatmaps.",
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y
|
||||
},
|
||||
downloadButton = new TriangleButton
|
||||
{
|
||||
Width = 300,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
Text = "Download beatmap selection",
|
||||
Action = download
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void download()
|
||||
{
|
||||
AddInternal(new BundledBeatmapDownloader());
|
||||
downloadButton.Enabled.Value = false;
|
||||
}
|
||||
}
|
||||
}
|
@ -60,6 +60,7 @@ namespace osu.Game.Overlays
|
||||
private readonly Type[] steps =
|
||||
{
|
||||
typeof(ScreenWelcome),
|
||||
typeof(ScreenBundledBeatmaps),
|
||||
typeof(ScreenUIScale)
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user