diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index b5855fe0e0..0dc5d8074d 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -25,6 +25,8 @@ namespace osu.Game.Screens.Select { public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap; + public override bool HandleInput => AllowSelection; + public Action BeatmapsChanged; public IEnumerable Beatmaps @@ -228,6 +230,8 @@ namespace osu.Game.Screens.Select private ScheduledDelegate filterTask; + public bool AllowSelection = true; + public void Filter(FilterCriteria newCriteria = null, bool debounce = true) { if (newCriteria != null) diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 51f570e901..e393caf931 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -105,6 +105,7 @@ namespace osu.Game.Screens.Select if (player != null) return; Beatmap.Value.Track.Looping = false; + Beatmap.Disabled = true; LoadComponentAsync(player = new PlayerLoader(new Player()), l => Push(player)); } diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index f8f7e727a7..9e1d230124 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -109,7 +109,7 @@ namespace osu.Game.Screens.Select Origin = Anchor.CentreRight, SelectionChanged = carouselSelectionChanged, BeatmapsChanged = carouselBeatmapsLoaded, - StartRequested = carouselRaisedStart + StartRequested = carouselRaisedStart, }); Add(FilterControl = new FilterControl { @@ -183,6 +183,9 @@ namespace osu.Game.Screens.Select carousel.Beatmaps = database.GetAllWithChildren(b => !b.DeletePending); Beatmap.ValueChanged += beatmap_ValueChanged; + + Beatmap.DisabledChanged += disabled => carousel.AllowSelection = !disabled; + carousel.AllowSelection = !Beatmap.Disabled; } private void carouselBeatmapsLoaded()