mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
Apply same conditional check changes to DrawableCarouselBeatmapSet
This commit is contained in:
parent
91b13f91ea
commit
03a74a4320
@ -46,6 +46,7 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
private void load(BeatmapManager manager, BeatmapSetOverlay beatmapOverlay)
|
private void load(BeatmapManager manager, BeatmapSetOverlay beatmapOverlay)
|
||||||
{
|
{
|
||||||
restoreHiddenRequested = s => s.Beatmaps.ForEach(manager.Restore);
|
restoreHiddenRequested = s => s.Beatmaps.ForEach(manager.Restore);
|
||||||
|
|
||||||
if (beatmapOverlay != null)
|
if (beatmapOverlay != null)
|
||||||
viewDetails = beatmapOverlay.FetchAndShowBeatmapSet;
|
viewDetails = beatmapOverlay.FetchAndShowBeatmapSet;
|
||||||
|
|
||||||
@ -131,13 +132,14 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
if (Item.State.Value == CarouselItemState.NotSelected)
|
if (Item.State.Value == CarouselItemState.NotSelected)
|
||||||
items.Add(new OsuMenuItem("Expand", MenuItemType.Highlighted, () => Item.State.Value = CarouselItemState.Selected));
|
items.Add(new OsuMenuItem("Expand", MenuItemType.Highlighted, () => Item.State.Value = CarouselItemState.Selected));
|
||||||
|
|
||||||
if (beatmapSet.OnlineBeatmapSetID != null)
|
if (beatmapSet.OnlineBeatmapSetID != null && viewDetails != null)
|
||||||
items.Add(new OsuMenuItem("Details...", MenuItemType.Standard, () => viewDetails?.Invoke(beatmapSet.OnlineBeatmapSetID.Value)));
|
items.Add(new OsuMenuItem("Details...", MenuItemType.Standard, () => viewDetails(beatmapSet.OnlineBeatmapSetID.Value)));
|
||||||
|
|
||||||
if (beatmapSet.Beatmaps.Any(b => b.Hidden))
|
if (beatmapSet.Beatmaps.Any(b => b.Hidden))
|
||||||
items.Add(new OsuMenuItem("Restore all hidden", MenuItemType.Standard, () => restoreHiddenRequested?.Invoke(beatmapSet)));
|
items.Add(new OsuMenuItem("Restore all hidden", MenuItemType.Standard, () => restoreHiddenRequested(beatmapSet)));
|
||||||
|
|
||||||
items.Add(new OsuMenuItem("Delete", MenuItemType.Destructive, () => dialogOverlay?.Push(new BeatmapDeleteDialog(beatmapSet))));
|
if (dialogOverlay != null)
|
||||||
|
items.Add(new OsuMenuItem("Delete", MenuItemType.Destructive, () => dialogOverlay.Push(new BeatmapDeleteDialog(beatmapSet))));
|
||||||
|
|
||||||
return items.ToArray();
|
return items.ToArray();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user