1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 07:22:54 +08:00

Rename classes

This commit is contained in:
smoogipoo 2020-09-05 03:55:43 +09:00
parent ebd11ae0b7
commit 345fb9d8e0
12 changed files with 27 additions and 27 deletions

View File

@ -18,7 +18,7 @@ namespace osu.Game.Tests.Visual.Collections
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
new CollectionDialog { State = { Value = Visibility.Visible } }, new ManageCollectionDialog { State = { Value = Visibility.Visible } },
dialogOverlay = new DialogOverlay() dialogOverlay = new DialogOverlay()
}; };
} }

View File

@ -18,7 +18,7 @@ using osu.Game.IO.Legacy;
namespace osu.Game.Collections namespace osu.Game.Collections
{ {
public class CollectionManager : CompositeDrawable public class BeatmapCollectionManager : CompositeDrawable
{ {
/// <summary> /// <summary>
/// Database version in YYYYMMDD format (matching stable). /// Database version in YYYYMMDD format (matching stable).

View File

@ -10,7 +10,7 @@ namespace osu.Game.Collections
public class DeleteCollectionDialog : PopupDialog public class DeleteCollectionDialog : PopupDialog
{ {
[Resolved] [Resolved]
private CollectionManager collectionManager { get; set; } private BeatmapCollectionManager collectionManager { get; set; }
public DeleteCollectionDialog(BeatmapCollection collection) public DeleteCollectionDialog(BeatmapCollection collection)
{ {

View File

@ -8,7 +8,7 @@ using osuTK;
namespace osu.Game.Collections namespace osu.Game.Collections
{ {
public class CollectionList : OsuRearrangeableListContainer<BeatmapCollection> public class DrawableCollectionList : OsuRearrangeableListContainer<BeatmapCollection>
{ {
protected override ScrollContainer<Drawable> CreateScrollContainer() => base.CreateScrollContainer().With(d => protected override ScrollContainer<Drawable> CreateScrollContainer() => base.CreateScrollContainer().With(d =>
{ {
@ -22,6 +22,6 @@ namespace osu.Game.Collections
Spacing = new Vector2(0, 2) Spacing = new Vector2(0, 2)
}; };
protected override OsuRearrangeableListItem<BeatmapCollection> CreateOsuDrawable(BeatmapCollection item) => new CollectionListItem(item); protected override OsuRearrangeableListItem<BeatmapCollection> CreateOsuDrawable(BeatmapCollection item) => new DrawableCollectionListItem(item);
} }
} }

View File

@ -18,11 +18,11 @@ using osuTK.Graphics;
namespace osu.Game.Collections namespace osu.Game.Collections
{ {
public class CollectionListItem : OsuRearrangeableListItem<BeatmapCollection> public class DrawableCollectionListItem : OsuRearrangeableListItem<BeatmapCollection>
{ {
private const float item_height = 35; private const float item_height = 35;
public CollectionListItem(BeatmapCollection item) public DrawableCollectionListItem(BeatmapCollection item)
: base(item) : base(item)
{ {
Padding = new MarginPadding { Right = 20 }; Padding = new MarginPadding { Right = 20 };

View File

@ -13,15 +13,15 @@ using osuTK;
namespace osu.Game.Collections namespace osu.Game.Collections
{ {
public class CollectionDialog : OsuFocusedOverlayContainer public class ManageCollectionDialog : OsuFocusedOverlayContainer
{ {
private const double enter_duration = 500; private const double enter_duration = 500;
private const double exit_duration = 200; private const double exit_duration = 200;
[Resolved] [Resolved]
private CollectionManager collectionManager { get; set; } private BeatmapCollectionManager collectionManager { get; set; }
public CollectionDialog() public ManageCollectionDialog()
{ {
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
Origin = Anchor.Centre; Origin = Anchor.Centre;
@ -79,7 +79,7 @@ namespace osu.Game.Collections
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = colours.GreySeafoamDarker Colour = colours.GreySeafoamDarker
}, },
new CollectionList new DrawableCollectionList
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Items = { BindTarget = collectionManager.Collections } Items = { BindTarget = collectionManager.Collections }

View File

@ -633,7 +633,7 @@ namespace osu.Game
loadComponentSingleFile(CreateUpdateManager(), Add, true); loadComponentSingleFile(CreateUpdateManager(), Add, true);
// overlay elements // overlay elements
loadComponentSingleFile(new CollectionDialog(), overlayContent.Add, true); loadComponentSingleFile(new ManageCollectionDialog(), overlayContent.Add, true);
loadComponentSingleFile(beatmapListing = new BeatmapListingOverlay(), overlayContent.Add, true); loadComponentSingleFile(beatmapListing = new BeatmapListingOverlay(), overlayContent.Add, true);
loadComponentSingleFile(dashboard = new DashboardOverlay(), overlayContent.Add, true); loadComponentSingleFile(dashboard = new DashboardOverlay(), overlayContent.Add, true);
loadComponentSingleFile(news = new NewsOverlay(), overlayContent.Add, true); loadComponentSingleFile(news = new NewsOverlay(), overlayContent.Add, true);

View File

@ -56,7 +56,7 @@ namespace osu.Game
protected BeatmapManager BeatmapManager; protected BeatmapManager BeatmapManager;
protected CollectionManager CollectionManager; protected BeatmapCollectionManager CollectionManager;
protected ScoreManager ScoreManager; protected ScoreManager ScoreManager;
@ -225,7 +225,7 @@ namespace osu.Game
dependencies.Cache(difficultyManager); dependencies.Cache(difficultyManager);
AddInternal(difficultyManager); AddInternal(difficultyManager);
dependencies.Cache(CollectionManager = new CollectionManager()); dependencies.Cache(CollectionManager = new BeatmapCollectionManager());
AddInternal(CollectionManager); AddInternal(CollectionManager);
dependencies.Cache(KeyBindingStore = new KeyBindingStore(contextFactory, RulesetStore)); dependencies.Cache(KeyBindingStore = new KeyBindingStore(contextFactory, RulesetStore));

View File

@ -28,7 +28,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
private TriangleButton undeleteButton; private TriangleButton undeleteButton;
[BackgroundDependencyLoader] [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) if (beatmaps.SupportsImportFromStable)
{ {
@ -108,7 +108,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
} }
}); });
if (collections.SupportsImportFromStable) if (collectionManager.SupportsImportFromStable)
{ {
Add(importCollectionsButton = new SettingsButton Add(importCollectionsButton = new SettingsButton
{ {
@ -116,7 +116,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
Action = () => Action = () =>
{ {
importCollectionsButton.Enabled.Value = false; 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", Text = "Delete ALL collections",
Action = () => Action = () =>
{ {
dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() => collections.Collections.Clear())); dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() => collectionManager.Collections.Clear()));
} }
}); });

View File

@ -49,10 +49,10 @@ namespace osu.Game.Screens.Select.Carousel
private BeatmapDifficultyManager difficultyManager { get; set; } private BeatmapDifficultyManager difficultyManager { get; set; }
[Resolved] [Resolved]
private CollectionManager collectionManager { get; set; } private BeatmapCollectionManager collectionManager { get; set; }
[Resolved(CanBeNull = true)] [Resolved(CanBeNull = true)]
private CollectionDialog collectionDialog { get; set; } private ManageCollectionDialog manageCollectionDialog { get; set; }
private IBindable<StarDifficulty> starDifficultyBindable; private IBindable<StarDifficulty> starDifficultyBindable;
private CancellationTokenSource starDifficultyCancellationSource; 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))); 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(); var collectionItems = collectionManager.Collections.OrderByDescending(c => c.LastModifyTime).Take(3).Select(createCollectionMenuItem).ToList();
if (collectionDialog != null) if (manageCollectionDialog != null)
collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, collectionDialog.Show)); collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, manageCollectionDialog.Show));
items.Add(new OsuMenuItem("Add to...") { Items = collectionItems }); items.Add(new OsuMenuItem("Add to...") { Items = collectionItems });

View File

@ -36,10 +36,10 @@ namespace osu.Game.Screens.Select.Carousel
private DialogOverlay dialogOverlay { get; set; } private DialogOverlay dialogOverlay { get; set; }
[Resolved] [Resolved]
private CollectionManager collectionManager { get; set; } private BeatmapCollectionManager collectionManager { get; set; }
[Resolved(CanBeNull = true)] [Resolved(CanBeNull = true)]
private CollectionDialog collectionDialog { get; set; } private ManageCollectionDialog manageCollectionDialog { get; set; }
private readonly BeatmapSetInfo beatmapSet; 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)))); 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(); var collectionItems = collectionManager.Collections.OrderByDescending(c => c.LastModifyTime).Take(3).Select(createCollectionMenuItem).ToList();
if (collectionDialog != null) if (manageCollectionDialog != null)
collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, collectionDialog.Show)); collectionItems.Add(new OsuMenuItem("More...", MenuItemType.Standard, manageCollectionDialog.Show));
items.Add(new OsuMenuItem("Add all to...") { Items = collectionItems }); items.Add(new OsuMenuItem("Add all to...") { Items = collectionItems });

View File

@ -216,7 +216,7 @@ namespace osu.Game.Screens.Select
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(CollectionManager collectionManager) private void load(BeatmapCollectionManager collectionManager)
{ {
collections.BindTo(collectionManager.Collections); collections.BindTo(collectionManager.Collections);
collections.CollectionChanged += (_, __) => collectionsChanged(); collections.CollectionChanged += (_, __) => collectionsChanged();