diff --git a/osu.Game.Tests/Visual/Collections/TestSceneCollectionDialog.cs b/osu.Game.Tests/Visual/Collections/TestSceneCollectionDialog.cs index f810361610..247d27f67a 100644 --- a/osu.Game.Tests/Visual/Collections/TestSceneCollectionDialog.cs +++ b/osu.Game.Tests/Visual/Collections/TestSceneCollectionDialog.cs @@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.Collections { Children = new Drawable[] { - new CollectionDialog { State = { Value = Visibility.Visible } }, + new ManageCollectionDialog { State = { Value = Visibility.Visible } }, dialogOverlay = new DialogOverlay() }; } diff --git a/osu.Game/Collections/CollectionManager.cs b/osu.Game/Collections/BeatmapCollectionManager.cs similarity index 99% rename from osu.Game/Collections/CollectionManager.cs rename to osu.Game/Collections/BeatmapCollectionManager.cs index 20bf96da9d..0b066708d8 100644 --- a/osu.Game/Collections/CollectionManager.cs +++ b/osu.Game/Collections/BeatmapCollectionManager.cs @@ -18,7 +18,7 @@ using osu.Game.IO.Legacy; namespace osu.Game.Collections { - public class CollectionManager : CompositeDrawable + public class BeatmapCollectionManager : CompositeDrawable { /// /// Database version in YYYYMMDD format (matching stable). diff --git a/osu.Game/Collections/DeleteCollectionDialog.cs b/osu.Game/Collections/DeleteCollectionDialog.cs index a7677e9de2..81bedca638 100644 --- a/osu.Game/Collections/DeleteCollectionDialog.cs +++ b/osu.Game/Collections/DeleteCollectionDialog.cs @@ -10,7 +10,7 @@ namespace osu.Game.Collections public class DeleteCollectionDialog : PopupDialog { [Resolved] - private CollectionManager collectionManager { get; set; } + private BeatmapCollectionManager collectionManager { get; set; } public DeleteCollectionDialog(BeatmapCollection collection) { diff --git a/osu.Game/Collections/CollectionList.cs b/osu.Game/Collections/DrawableCollectionList.cs similarity index 83% rename from osu.Game/Collections/CollectionList.cs rename to osu.Game/Collections/DrawableCollectionList.cs index 990f82e702..ab146c17b6 100644 --- a/osu.Game/Collections/CollectionList.cs +++ b/osu.Game/Collections/DrawableCollectionList.cs @@ -8,7 +8,7 @@ using osuTK; namespace osu.Game.Collections { - public class CollectionList : OsuRearrangeableListContainer + public class DrawableCollectionList : OsuRearrangeableListContainer { protected override ScrollContainer CreateScrollContainer() => base.CreateScrollContainer().With(d => { @@ -22,6 +22,6 @@ namespace osu.Game.Collections Spacing = new Vector2(0, 2) }; - protected override OsuRearrangeableListItem CreateOsuDrawable(BeatmapCollection item) => new CollectionListItem(item); + protected override OsuRearrangeableListItem CreateOsuDrawable(BeatmapCollection item) => new DrawableCollectionListItem(item); } } diff --git a/osu.Game/Collections/CollectionListItem.cs b/osu.Game/Collections/DrawableCollectionListItem.cs similarity index 96% rename from osu.Game/Collections/CollectionListItem.cs rename to osu.Game/Collections/DrawableCollectionListItem.cs index 527ed57cd0..67756cdb43 100644 --- a/osu.Game/Collections/CollectionListItem.cs +++ b/osu.Game/Collections/DrawableCollectionListItem.cs @@ -18,11 +18,11 @@ using osuTK.Graphics; namespace osu.Game.Collections { - public class CollectionListItem : OsuRearrangeableListItem + public class DrawableCollectionListItem : OsuRearrangeableListItem { private const float item_height = 35; - public CollectionListItem(BeatmapCollection item) + public DrawableCollectionListItem(BeatmapCollection item) : base(item) { Padding = new MarginPadding { Right = 20 }; diff --git a/osu.Game/Collections/CollectionDialog.cs b/osu.Game/Collections/ManageCollectionDialog.cs similarity index 94% rename from osu.Game/Collections/CollectionDialog.cs rename to osu.Game/Collections/ManageCollectionDialog.cs index e911b507e5..6a0d815e43 100644 --- a/osu.Game/Collections/CollectionDialog.cs +++ b/osu.Game/Collections/ManageCollectionDialog.cs @@ -13,15 +13,15 @@ using osuTK; namespace osu.Game.Collections { - public class CollectionDialog : OsuFocusedOverlayContainer + public class ManageCollectionDialog : OsuFocusedOverlayContainer { private const double enter_duration = 500; private const double exit_duration = 200; [Resolved] - private CollectionManager collectionManager { get; set; } + private BeatmapCollectionManager collectionManager { get; set; } - public CollectionDialog() + public ManageCollectionDialog() { Anchor = Anchor.Centre; Origin = Anchor.Centre; @@ -79,7 +79,7 @@ namespace osu.Game.Collections RelativeSizeAxes = Axes.Both, Colour = colours.GreySeafoamDarker }, - new CollectionList + new DrawableCollectionList { RelativeSizeAxes = Axes.Both, Items = { BindTarget = collectionManager.Collections } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index 1f69888d2e..2f8f1b2f17 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -633,7 +633,7 @@ namespace osu.Game loadComponentSingleFile(CreateUpdateManager(), Add, true); // overlay elements - loadComponentSingleFile(new CollectionDialog(), overlayContent.Add, true); + loadComponentSingleFile(new ManageCollectionDialog(), overlayContent.Add, true); loadComponentSingleFile(beatmapListing = new BeatmapListingOverlay(), overlayContent.Add, true); loadComponentSingleFile(dashboard = new DashboardOverlay(), overlayContent.Add, true); loadComponentSingleFile(news = new NewsOverlay(), overlayContent.Add, true); diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index d512f57ca5..a7efecadfd 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -56,7 +56,7 @@ namespace osu.Game protected BeatmapManager BeatmapManager; - protected CollectionManager CollectionManager; + protected BeatmapCollectionManager CollectionManager; protected ScoreManager ScoreManager; @@ -225,7 +225,7 @@ namespace osu.Game dependencies.Cache(difficultyManager); AddInternal(difficultyManager); - dependencies.Cache(CollectionManager = new CollectionManager()); + dependencies.Cache(CollectionManager = new BeatmapCollectionManager()); AddInternal(CollectionManager); dependencies.Cache(KeyBindingStore = new KeyBindingStore(contextFactory, RulesetStore)); diff --git a/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs b/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs index 21a5ed6b31..74f9920ae0 100644 --- a/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs +++ b/osu.Game/Overlays/Settings/Sections/Maintenance/GeneralSettings.cs @@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance private TriangleButton undeleteButton; [BackgroundDependencyLoader] - private void load(BeatmapManager beatmaps, ScoreManager scores, SkinManager skins, CollectionManager collections, DialogOverlay dialogOverlay) + private void load(BeatmapManager beatmaps, ScoreManager scores, SkinManager skins, BeatmapCollectionManager collectionManager, DialogOverlay dialogOverlay) { if (beatmaps.SupportsImportFromStable) { @@ -108,7 +108,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance } }); - if (collections.SupportsImportFromStable) + if (collectionManager.SupportsImportFromStable) { Add(importCollectionsButton = new SettingsButton { @@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance Action = () => { importCollectionsButton.Enabled.Value = false; - collections.ImportFromStableAsync().ContinueWith(t => Schedule(() => importCollectionsButton.Enabled.Value = true)); + collectionManager.ImportFromStableAsync().ContinueWith(t => Schedule(() => importCollectionsButton.Enabled.Value = true)); } }); } @@ -126,7 +126,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance Text = "Delete ALL collections", Action = () => { - dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() => collections.Collections.Clear())); + dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() => collectionManager.Collections.Clear())); } }); diff --git a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs index fe4c95f4e3..8fd428d26e 100644 --- a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs +++ b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmap.cs @@ -49,10 +49,10 @@ namespace osu.Game.Screens.Select.Carousel private BeatmapDifficultyManager difficultyManager { get; set; } [Resolved] - private CollectionManager collectionManager { get; set; } + private BeatmapCollectionManager collectionManager { get; set; } [Resolved(CanBeNull = true)] - private CollectionDialog collectionDialog { get; set; } + private ManageCollectionDialog manageCollectionDialog { get; set; } private IBindable starDifficultyBindable; private CancellationTokenSource starDifficultyCancellationSource; @@ -228,8 +228,8 @@ namespace osu.Game.Screens.Select.Carousel items.Add(new OsuMenuItem("Details", MenuItemType.Standard, () => beatmapOverlay.FetchAndShowBeatmap(beatmap.OnlineBeatmapID.Value))); var collectionItems = collectionManager.Collections.OrderByDescending(c => c.LastModifyTime).Take(3).Select(createCollectionMenuItem).ToList(); - if (collectionDialog != null) - collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, collectionDialog.Show)); + if (manageCollectionDialog != null) + collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, manageCollectionDialog.Show)); items.Add(new OsuMenuItem("Add to...") { Items = collectionItems }); diff --git a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs index 8a9b0dc5b3..12c6b320e9 100644 --- a/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs +++ b/osu.Game/Screens/Select/Carousel/DrawableCarouselBeatmapSet.cs @@ -36,10 +36,10 @@ namespace osu.Game.Screens.Select.Carousel private DialogOverlay dialogOverlay { get; set; } [Resolved] - private CollectionManager collectionManager { get; set; } + private BeatmapCollectionManager collectionManager { get; set; } [Resolved(CanBeNull = true)] - private CollectionDialog collectionDialog { get; set; } + private ManageCollectionDialog manageCollectionDialog { get; set; } private readonly BeatmapSetInfo beatmapSet; @@ -149,8 +149,8 @@ namespace osu.Game.Screens.Select.Carousel items.Add(new OsuMenuItem("Delete", MenuItemType.Destructive, () => dialogOverlay.Push(new BeatmapDeleteDialog(beatmapSet)))); var collectionItems = collectionManager.Collections.OrderByDescending(c => c.LastModifyTime).Take(3).Select(createCollectionMenuItem).ToList(); - if (collectionDialog != null) - collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, collectionDialog.Show)); + if (manageCollectionDialog != null) + collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, manageCollectionDialog.Show)); items.Add(new OsuMenuItem("Add all to...") { Items = collectionItems }); diff --git a/osu.Game/Screens/Select/FilterControl.cs b/osu.Game/Screens/Select/FilterControl.cs index 0b85ae0e6a..0db24f0738 100644 --- a/osu.Game/Screens/Select/FilterControl.cs +++ b/osu.Game/Screens/Select/FilterControl.cs @@ -216,7 +216,7 @@ namespace osu.Game.Screens.Select } [BackgroundDependencyLoader] - private void load(CollectionManager collectionManager) + private void load(BeatmapCollectionManager collectionManager) { collections.BindTo(collectionManager.Collections); collections.CollectionChanged += (_, __) => collectionsChanged();