Disable manage collections item in now playing overlay

This commit is contained in:
smoogipoo 2020-09-11 16:58:18 +09:00
parent fcc8683629
commit 6327f12fe4
2 changed files with 10 additions and 1 deletions

View File

@ -24,6 +24,11 @@ namespace osu.Game.Collections
/// </summary>
public class CollectionFilterDropdown : OsuDropdown<CollectionFilterMenuItem>
{
/// <summary>
/// Whether to show the "manage collections..." menu item in the dropdown.
/// </summary>
protected virtual bool ShowManageCollectionsItem => true;
private readonly IBindableList<BeatmapCollection> collections = new BindableList<BeatmapCollection>();
private readonly IBindableList<BeatmapInfo> beatmaps = new BindableList<BeatmapInfo>();
private readonly BindableList<CollectionFilterMenuItem> filters = new BindableList<CollectionFilterMenuItem>();
@ -63,7 +68,9 @@ namespace osu.Game.Collections
filters.Clear();
filters.Add(new AllBeatmapsCollectionFilterMenuItem());
filters.AddRange(collections.Select(c => new CollectionFilterMenuItem(c)));
filters.Add(new ManageCollectionsFilterMenuItem());
if (ShowManageCollectionsItem)
filters.Add(new ManageCollectionsFilterMenuItem());
Current.Value = filters.SingleOrDefault(f => f.Collection != null && f.Collection == selectedItem) ?? filters[0];
}

View File

@ -17,6 +17,8 @@ namespace osu.Game.Overlays.Music
/// </summary>
public class CollectionDropdown : CollectionFilterDropdown
{
protected override bool ShowManageCollectionsItem => false;
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{