mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into profile-beatmaps-section
This commit is contained in:
@ -186,13 +186,18 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public Action<BeatmapInfo> HideDifficultyRequested;
|
public Action<BeatmapInfo> HideDifficultyRequested;
|
||||||
|
|
||||||
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
private void selectNullBeatmap()
|
||||||
{
|
|
||||||
if (groups.All(g => g.State == BeatmapGroupState.Hidden))
|
|
||||||
{
|
{
|
||||||
selectedGroup = null;
|
selectedGroup = null;
|
||||||
selectedPanel = null;
|
selectedPanel = null;
|
||||||
SelectionChanged?.Invoke(null);
|
SelectionChanged?.Invoke(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
||||||
|
{
|
||||||
|
if (groups.All(g => g.State == BeatmapGroupState.Hidden))
|
||||||
|
{
|
||||||
|
selectNullBeatmap();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,6 +388,14 @@ namespace osu.Game.Screens.Select
|
|||||||
if (group == null)
|
if (group == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (selectedGroup == group)
|
||||||
|
{
|
||||||
|
if (getVisibleGroups().Count() == 1)
|
||||||
|
selectNullBeatmap();
|
||||||
|
else
|
||||||
|
SelectNext();
|
||||||
|
}
|
||||||
|
|
||||||
groups.Remove(group);
|
groups.Remove(group);
|
||||||
panels.Remove(group.Header);
|
panels.Remove(group.Header);
|
||||||
foreach (var p in group.BeatmapPanels)
|
foreach (var p in group.BeatmapPanels)
|
||||||
@ -391,9 +404,6 @@ namespace osu.Game.Screens.Select
|
|||||||
scrollableContent.Remove(group.Header);
|
scrollableContent.Remove(group.Header);
|
||||||
scrollableContent.RemoveRange(group.BeatmapPanels);
|
scrollableContent.RemoveRange(group.BeatmapPanels);
|
||||||
|
|
||||||
if (selectedGroup == group)
|
|
||||||
SelectNext();
|
|
||||||
|
|
||||||
computeYPositions();
|
computeYPositions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user