mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 22:27:25 +08:00
Fixed BeatmapPanels disappearing
This commit is contained in:
parent
7dcbefd50f
commit
6b3ecc28b8
@ -176,6 +176,7 @@ namespace osu.Game.Screens.Select
|
||||
if (SelectedGroup != null && SelectedGroup != group && SelectedGroup.State != BeatmapGroupState.Hidden)
|
||||
SelectedGroup.State = BeatmapGroupState.Collapsed;
|
||||
|
||||
group.State = BeatmapGroupState.Expanded;
|
||||
SelectedGroup = group;
|
||||
panel.State = PanelSelectedState.Selected;
|
||||
SelectedPanel = panel;
|
||||
@ -220,6 +221,20 @@ namespace osu.Game.Screens.Select
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
scrollableContent.Clear(false);
|
||||
lifetime.Clear();
|
||||
foreach (BeatmapGroup group in groups)
|
||||
{
|
||||
group.Header.Depth = -scrollableContent.Children.Count();
|
||||
scrollableContent.Add(group.Header);
|
||||
|
||||
foreach (BeatmapPanel panel in group.BeatmapPanels)
|
||||
{
|
||||
panel.Depth = -scrollableContent.Children.Count();
|
||||
scrollableContent.Add(panel);
|
||||
}
|
||||
}
|
||||
SelectGroup(groups.FirstOrDefault(), groups.First().BeatmapPanels.FirstOrDefault());
|
||||
}
|
||||
|
||||
private static float offsetX(float dist, float halfHeight)
|
||||
|
Loading…
Reference in New Issue
Block a user