// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using JetBrains.Annotations; using osu.Framework.Bindables; using osu.Game.Collections; namespace osu.Game.Screens.Select { /// /// A filter. /// public class CollectionMenuItem { /// /// The collection to filter beatmaps from. /// May be null to not filter by collection (include all beatmaps). /// [CanBeNull] public readonly BeatmapCollection Collection; /// /// The name of the collection. /// [NotNull] public readonly Bindable CollectionName; /// /// Creates a new . /// /// The collection to filter beatmaps from. public CollectionMenuItem([CanBeNull] BeatmapCollection collection) { Collection = collection; CollectionName = Collection?.Name.GetBoundCopy() ?? new Bindable("All beatmaps"); } } public class AllBeatmapsCollectionMenuItem : CollectionMenuItem { public AllBeatmapsCollectionMenuItem() : base(null) { } } public class ManageCollectionsMenuItem : CollectionMenuItem { public ManageCollectionsMenuItem() : base(null) { CollectionName.Value = "Manage collections..."; } } }