diff --git a/osu.Game.Tests/Visual/TestCaseNotificationOverlay.cs b/osu.Game.Tests/Visual/TestCaseNotificationOverlay.cs index 3dca860909..b0141649f2 100644 --- a/osu.Game.Tests/Visual/TestCaseNotificationOverlay.cs +++ b/osu.Game.Tests/Visual/TestCaseNotificationOverlay.cs @@ -82,7 +82,11 @@ namespace osu.Game.Tests.Visual private void sendProgress2() { - var n = new ProgressNotification { Text = @"Downloading Haitai..." }; + var n = new ProgressNotification + { + Text = @"Downloading Haitai...", + CompletionText = "Downloaded Haitai!", + }; manager.Post(n); progressingNotifications.Add(n); } @@ -91,7 +95,11 @@ namespace osu.Game.Tests.Visual private void sendProgress1() { - var n = new ProgressNotification { Text = @"Uploading to BSS..." }; + var n = new ProgressNotification + { + Text = @"Uploading to BSS...", + CompletionText = "Uploaded to BSS!", + }; manager.Post(n); progressingNotifications.Add(n); } diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index c4b2c93d7e..a1ad708304 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -134,6 +134,7 @@ namespace osu.Game.Beatmaps var notification = new ProgressNotification { Text = "Beatmap import is initialising...", + CompletionText = "Import successful!", Progress = 0, State = ProgressNotificationState.Active, }; @@ -245,8 +246,9 @@ namespace osu.Game.Beatmaps return; } - ProgressNotification downloadNotification = new ProgressNotification + var downloadNotification = new ProgressNotification { + CompletionText = $"Imported {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}!", Text = $"Downloading {beatmapSetInfo.Metadata.Artist} - {beatmapSetInfo.Metadata.Title}", }; @@ -665,6 +667,7 @@ namespace osu.Game.Beatmaps var notification = new ProgressNotification { Progress = 0, + CompletionText = "Deleted all beatmaps!", State = ProgressNotificationState.Active, }; diff --git a/osu.Game/Overlays/Notifications/ProgressNotification.cs b/osu.Game/Overlays/Notifications/ProgressNotification.cs index 58aff16de0..12c7fe64ba 100644 --- a/osu.Game/Overlays/Notifications/ProgressNotification.cs +++ b/osu.Game/Overlays/Notifications/ProgressNotification.cs @@ -22,6 +22,8 @@ namespace osu.Game.Overlays.Notifications } } + public string CompletionText { get; set; } = "Task has completed!"; + public float Progress { get { return progressBar.Progress; } @@ -87,7 +89,7 @@ namespace osu.Game.Overlays.Notifications protected virtual Notification CreateCompletionNotification() => new ProgressCompletionNotification { Activated = CompletionClickAction, - Text = "Task has completed!" + Text = CompletionText }; protected virtual void Completed()