mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:53:22 +08:00
Merge branch 'master' into fix-empty-carousel
This commit is contained in:
commit
e84d8cc020
@ -25,6 +25,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
public BeatmapInfo SelectedBeatmap => selectedPanel?.Beatmap;
|
||||
|
||||
public override bool HandleInput => AllowSelection;
|
||||
|
||||
public Action BeatmapsChanged;
|
||||
|
||||
public IEnumerable<BeatmapSetInfo> 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)
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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<BeatmapSetInfo>(b => !b.DeletePending);
|
||||
|
||||
Beatmap.ValueChanged += beatmap_ValueChanged;
|
||||
|
||||
Beatmap.DisabledChanged += disabled => carousel.AllowSelection = !disabled;
|
||||
carousel.AllowSelection = !Beatmap.Disabled;
|
||||
}
|
||||
|
||||
private void carouselBeatmapsLoaded()
|
||||
|
Loading…
Reference in New Issue
Block a user