1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Add message letting users know that beatmaps are donwloading in the background

This commit is contained in:
Dean Herbert 2024-05-07 14:26:49 +08:00
parent 91c684151a
commit 1d6915478f
No known key found for this signature in database
2 changed files with 21 additions and 0 deletions

View File

@ -39,6 +39,11 @@ namespace osu.Game.Localisation
/// </summary> /// </summary>
public static LocalisableString BundledButton => new TranslatableString(getKey(@"bundled_button"), @"Get recommended beatmaps"); public static LocalisableString BundledButton => new TranslatableString(getKey(@"bundled_button"), @"Get recommended beatmaps");
/// <summary>
/// "Beatmaps will be downloaded in the background. You can continue with setup while this happens!"
/// </summary>
public static LocalisableString DownloadingInBackground => new TranslatableString(getKey(@"downloading_in_background"), @"Beatmaps will be downloaded in the background. You can continue with setup while this happens!");
/// <summary> /// <summary>
/// "You can also obtain more beatmaps from the main menu &quot;browse&quot; button at any time." /// "You can also obtain more beatmaps from the main menu &quot;browse&quot; button at any time."
/// </summary> /// </summary>

View File

@ -15,6 +15,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Localisation; using osu.Game.Localisation;
using osu.Game.Online; using osu.Game.Online;
using osuTK; using osuTK;
using osuTK.Graphics;
using Realms; using Realms;
namespace osu.Game.Overlays.FirstRunSetup namespace osu.Game.Overlays.FirstRunSetup
@ -25,6 +26,8 @@ namespace osu.Game.Overlays.FirstRunSetup
private ProgressRoundedButton downloadBundledButton = null!; private ProgressRoundedButton downloadBundledButton = null!;
private ProgressRoundedButton downloadTutorialButton = null!; private ProgressRoundedButton downloadTutorialButton = null!;
private OsuTextFlowContainer downloadInBackgroundText = null!;
private OsuTextFlowContainer currentlyLoadedBeatmaps = null!; private OsuTextFlowContainer currentlyLoadedBeatmaps = null!;
private BundledBeatmapDownloader? tutorialDownloader; private BundledBeatmapDownloader? tutorialDownloader;
@ -100,6 +103,15 @@ namespace osu.Game.Overlays.FirstRunSetup
Text = FirstRunSetupBeatmapScreenStrings.BundledButton, Text = FirstRunSetupBeatmapScreenStrings.BundledButton,
Action = downloadBundled Action = downloadBundled
}, },
downloadInBackgroundText = new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: CONTENT_FONT_SIZE))
{
Colour = OverlayColourProvider.Light2,
Alpha = 0,
TextAnchor = Anchor.TopCentre,
Text = FirstRunSetupBeatmapScreenStrings.DownloadingInBackground,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
},
new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: CONTENT_FONT_SIZE)) new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: CONTENT_FONT_SIZE))
{ {
Colour = OverlayColourProvider.Content1, Colour = OverlayColourProvider.Content1,
@ -169,6 +181,10 @@ namespace osu.Game.Overlays.FirstRunSetup
if (bundledDownloader != null) if (bundledDownloader != null)
return; return;
downloadInBackgroundText
.FlashColour(Color4.White, 500)
.FadeIn(200);
bundledDownloader = new BundledBeatmapDownloader(false); bundledDownloader = new BundledBeatmapDownloader(false);
AddInternal(bundledDownloader); AddInternal(bundledDownloader);