diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs index 01e628075c..3ac3002713 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs @@ -23,21 +23,21 @@ namespace osu.Game.Tests.Visual.UserInterface [Test] public void TestLocal([Values] BeatmapSetCoverType coverType) { - AddStep("setup cover", () => Child = new UpdateableBeatmapSetCover(coverType) + AddStep("setup cover", () => Child = new UpdateableOnlineBeatmapSetCover(coverType) { BeatmapSet = CreateBeatmap(Ruleset.Value).BeatmapInfo.BeatmapSet, RelativeSizeAxes = Axes.Both, Masking = true, }); - AddUntilStep("wait for load", () => this.ChildrenOfType().SingleOrDefault()?.IsLoaded ?? false); + AddUntilStep("wait for load", () => this.ChildrenOfType().SingleOrDefault()?.IsLoaded ?? false); } [Test] public void TestUnloadAndReload() { OsuScrollContainer scroll = null; - List covers = new List(); + List covers = new List(); AddStep("setup covers", () => { @@ -66,7 +66,7 @@ namespace osu.Game.Tests.Visual.UserInterface { var coverType = coverTypes[i % coverTypes.Count]; - var cover = new UpdateableBeatmapSetCover(coverType) + var cover = new UpdateableOnlineBeatmapSetCover(coverType) { BeatmapSet = setInfo, Height = 100, @@ -85,7 +85,7 @@ namespace osu.Game.Tests.Visual.UserInterface } }); - var loadedCovers = covers.Where(c => c.ChildrenOfType().SingleOrDefault()?.IsLoaded ?? false); + var loadedCovers = covers.Where(c => c.ChildrenOfType().SingleOrDefault()?.IsLoaded ?? false); AddUntilStep("some loaded", () => loadedCovers.Any()); AddStep("scroll to end", () => scroll.ScrollToEnd()); @@ -95,9 +95,9 @@ namespace osu.Game.Tests.Visual.UserInterface [Test] public void TestSetNullBeatmapWhileLoading() { - TestUpdateableBeatmapSetCover updateableCover = null; + TestUpdateableOnlineBeatmapSetCover updateableCover = null; - AddStep("setup cover", () => Child = updateableCover = new TestUpdateableBeatmapSetCover + AddStep("setup cover", () => Child = updateableCover = new TestUpdateableOnlineBeatmapSetCover { BeatmapSet = CreateBeatmap(Ruleset.Value).BeatmapInfo.BeatmapSet, RelativeSizeAxes = Axes.Both, @@ -112,10 +112,10 @@ namespace osu.Game.Tests.Visual.UserInterface [Test] public void TestCoverChangeOnNewBeatmap() { - TestUpdateableBeatmapSetCover updateableCover = null; - BeatmapSetCover initialCover = null; + TestUpdateableOnlineBeatmapSetCover updateableCover = null; + OnlineBeatmapSetCover initialCover = null; - AddStep("setup cover", () => Child = updateableCover = new TestUpdateableBeatmapSetCover(0) + AddStep("setup cover", () => Child = updateableCover = new TestUpdateableOnlineBeatmapSetCover(0) { BeatmapSet = createBeatmapWithCover("https://assets.ppy.sh/beatmaps/1189904/covers/cover.jpg"), RelativeSizeAxes = Axes.Both, @@ -123,13 +123,13 @@ namespace osu.Game.Tests.Visual.UserInterface Alpha = 0.4f }); - AddUntilStep("cover loaded", () => updateableCover.ChildrenOfType().Any()); - AddStep("store initial cover", () => initialCover = updateableCover.ChildrenOfType().Single()); + AddUntilStep("cover loaded", () => updateableCover.ChildrenOfType().Any()); + AddStep("store initial cover", () => initialCover = updateableCover.ChildrenOfType().Single()); AddUntilStep("wait for fade complete", () => initialCover.Alpha == 1); AddStep("switch beatmap", () => updateableCover.BeatmapSet = createBeatmapWithCover("https://assets.ppy.sh/beatmaps/1079428/covers/cover.jpg")); - AddUntilStep("new cover loaded", () => updateableCover.ChildrenOfType().Except(new[] { initialCover }).Any()); + AddUntilStep("new cover loaded", () => updateableCover.ChildrenOfType().Except(new[] { initialCover }).Any()); } private static BeatmapSetInfo createBeatmapWithCover(string coverUrl) => new BeatmapSetInfo @@ -140,11 +140,11 @@ namespace osu.Game.Tests.Visual.UserInterface } }; - private class TestUpdateableBeatmapSetCover : UpdateableBeatmapSetCover + private class TestUpdateableOnlineBeatmapSetCover : UpdateableOnlineBeatmapSetCover { private readonly int loadDelay; - public TestUpdateableBeatmapSetCover(int loadDelay = 10000) + public TestUpdateableOnlineBeatmapSetCover(int loadDelay = 10000) { this.loadDelay = loadDelay; } @@ -154,7 +154,7 @@ namespace osu.Game.Tests.Visual.UserInterface if (model == null) return null; - return new TestBeatmapSetCover(model, loadDelay) + return new TestOnlineBeatmapSetCover(model, loadDelay) { Anchor = Anchor.Centre, Origin = Anchor.Centre, @@ -164,11 +164,11 @@ namespace osu.Game.Tests.Visual.UserInterface } } - private class TestBeatmapSetCover : BeatmapSetCover + private class TestOnlineBeatmapSetCover : OnlineBeatmapSetCover { private readonly int loadDelay; - public TestBeatmapSetCover(IBeatmapSetOnlineInfo set, int loadDelay) + public TestOnlineBeatmapSetCover(IBeatmapSetOnlineInfo set, int loadDelay) : base(set) { this.loadDelay = loadDelay; diff --git a/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs b/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs index a31430495d..be29566e07 100644 --- a/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs +++ b/osu.Game.Tournament/Components/TournamentBeatmapPanel.cs @@ -58,7 +58,7 @@ namespace osu.Game.Tournament.Components RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, - new UpdateableBeatmapSetCover + new UpdateableOnlineBeatmapSetCover { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(0.5f), diff --git a/osu.Game/Beatmaps/Drawables/BeatmapSetCover.cs b/osu.Game/Beatmaps/Drawables/OnlineBeatmapSetCover.cs similarity index 89% rename from osu.Game/Beatmaps/Drawables/BeatmapSetCover.cs rename to osu.Game/Beatmaps/Drawables/OnlineBeatmapSetCover.cs index 50c08ee2a3..0b19c27022 100644 --- a/osu.Game/Beatmaps/Drawables/BeatmapSetCover.cs +++ b/osu.Game/Beatmaps/Drawables/OnlineBeatmapSetCover.cs @@ -9,12 +9,12 @@ using osu.Framework.Graphics.Textures; namespace osu.Game.Beatmaps.Drawables { [LongRunningLoad] - public class BeatmapSetCover : Sprite + public class OnlineBeatmapSetCover : Sprite { private readonly IBeatmapSetOnlineInfo set; private readonly BeatmapSetCoverType type; - public BeatmapSetCover(IBeatmapSetOnlineInfo set, BeatmapSetCoverType type = BeatmapSetCoverType.Cover) + public OnlineBeatmapSetCover(IBeatmapSetOnlineInfo set, BeatmapSetCoverType type = BeatmapSetCoverType.Cover) { if (set == null) throw new ArgumentNullException(nameof(set)); diff --git a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs index 3206f7b3ab..8943ad350e 100644 --- a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs @@ -54,7 +54,7 @@ namespace osu.Game.Beatmaps.Drawables { // prefer online cover where available. if (model?.BeatmapSet?.OnlineInfo != null) - return new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType); + return new OnlineBeatmapSetCover(model.BeatmapSet, beatmapSetCoverType); return model?.ID > 0 ? new BeatmapBackgroundSprite(beatmaps.GetWorkingBeatmap(model)) diff --git a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs b/osu.Game/Beatmaps/Drawables/UpdateableOnlineBeatmapSetCover.cs similarity index 85% rename from osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs rename to osu.Game/Beatmaps/Drawables/UpdateableOnlineBeatmapSetCover.cs index 8bfe98c26b..73f87beb58 100644 --- a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapSetCover.cs +++ b/osu.Game/Beatmaps/Drawables/UpdateableOnlineBeatmapSetCover.cs @@ -9,7 +9,7 @@ using osu.Game.Graphics; namespace osu.Game.Beatmaps.Drawables { - public class UpdateableBeatmapSetCover : ModelBackedDrawable + public class UpdateableOnlineBeatmapSetCover : ModelBackedDrawable { private readonly BeatmapSetCoverType coverType; @@ -25,7 +25,7 @@ namespace osu.Game.Beatmaps.Drawables set => base.Masking = value; } - public UpdateableBeatmapSetCover(BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover) + public UpdateableOnlineBeatmapSetCover(BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover) { this.coverType = coverType; @@ -48,7 +48,7 @@ namespace osu.Game.Beatmaps.Drawables if (model == null) return null; - return new BeatmapSetCover(model, coverType) + return new OnlineBeatmapSetCover(model, coverType) { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, diff --git a/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs b/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs index bbde03aa10..da2dcfebdf 100644 --- a/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs +++ b/osu.Game/Overlays/BeatmapListing/BeatmapListingSearchControl.cs @@ -76,7 +76,7 @@ namespace osu.Game.Overlays.BeatmapListing private readonly BeatmapSearchFilterRow explicitContentFilter; private readonly Box background; - private readonly UpdateableBeatmapSetCover beatmapCover; + private readonly UpdateableOnlineBeatmapSetCover beatmapCover; public BeatmapListingSearchControl() { @@ -196,7 +196,7 @@ namespace osu.Game.Overlays.BeatmapListing } } - private class TopSearchBeatmapSetCover : UpdateableBeatmapSetCover + private class TopSearchBeatmapSetCover : UpdateableOnlineBeatmapSetCover { protected override bool TransformImmediately => true; } diff --git a/osu.Game/Overlays/BeatmapListing/Panels/BeatmapPanel.cs b/osu.Game/Overlays/BeatmapListing/Panels/BeatmapPanel.cs index 9ff39ce1dd..779f3860f2 100644 --- a/osu.Game/Overlays/BeatmapListing/Panels/BeatmapPanel.cs +++ b/osu.Game/Overlays/BeatmapListing/Panels/BeatmapPanel.cs @@ -160,7 +160,7 @@ namespace osu.Game.Overlays.BeatmapListing.Panels return icons; } - protected Drawable CreateBackground() => new UpdateableBeatmapSetCover + protected Drawable CreateBackground() => new UpdateableOnlineBeatmapSetCover { RelativeSizeAxes = Axes.Both, BeatmapSet = SetInfo, diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs b/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs index dcf06ac7fb..fc2f90807e 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs @@ -32,7 +32,7 @@ namespace osu.Game.Overlays.BeatmapSet public readonly Details Details; public readonly BeatmapPicker Picker; - private readonly UpdateableBeatmapSetCover cover; + private readonly UpdateableOnlineBeatmapSetCover cover; private readonly Box coverGradient; private readonly OsuSpriteText title, artist; private readonly AuthorInfo author; @@ -68,7 +68,7 @@ namespace osu.Game.Overlays.BeatmapSet RelativeSizeAxes = Axes.Both, Children = new Drawable[] { - cover = new UpdateableBeatmapSetCover + cover = new UpdateableOnlineBeatmapSetCover { RelativeSizeAxes = Axes.Both, Masking = true, diff --git a/osu.Game/Overlays/Dashboard/Home/DashboardBeatmapPanel.cs b/osu.Game/Overlays/Dashboard/Home/DashboardBeatmapPanel.cs index 3badea155d..edc737d8fe 100644 --- a/osu.Game/Overlays/Dashboard/Home/DashboardBeatmapPanel.cs +++ b/osu.Game/Overlays/Dashboard/Home/DashboardBeatmapPanel.cs @@ -77,7 +77,7 @@ namespace osu.Game.Overlays.Dashboard.Home RelativeSizeAxes = Axes.Both, Masking = true, CornerRadius = 6, - Child = new UpdateableBeatmapSetCover + Child = new UpdateableOnlineBeatmapSetCover { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, diff --git a/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedBeatmap.cs b/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedBeatmap.cs index 2c6fa76ca4..32201e36a9 100644 --- a/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedBeatmap.cs +++ b/osu.Game/Overlays/Profile/Sections/Historical/DrawableMostPlayedBeatmap.cs @@ -42,7 +42,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical { AddRangeInternal(new Drawable[] { - new UpdateableBeatmapSetCover(BeatmapSetCoverType.List) + new UpdateableOnlineBeatmapSetCover(BeatmapSetCoverType.List) { RelativeSizeAxes = Axes.Y, Width = cover_width,