mirror of
https://github.com/osukey/osukey.git
synced 2025-05-15 02:27:33 +09:00
Improve formatting of panel creation code
This commit is contained in:
parent
8045e0566f
commit
f142bd0dc0
@ -185,7 +185,17 @@ namespace osu.Game.Overlays
|
|||||||
private void recreatePanels(PanelDisplayStyle displayStyle)
|
private void recreatePanels(PanelDisplayStyle displayStyle)
|
||||||
{
|
{
|
||||||
if (BeatmapSets == null) return;
|
if (BeatmapSets == null) return;
|
||||||
panels.ChildrenEnumerable = BeatmapSets.Select(b => displayStyle == PanelDisplayStyle.Grid ? (DirectPanel)new DirectGridPanel(b) { Width = 400 } : new DirectListPanel(b));
|
|
||||||
|
panels.ChildrenEnumerable = BeatmapSets.Select<BeatmapSetInfo, DirectPanel>(b =>
|
||||||
|
{
|
||||||
|
switch (displayStyle)
|
||||||
|
{
|
||||||
|
case PanelDisplayStyle.Grid:
|
||||||
|
return new DirectGridPanel(b) { Width = 400 };
|
||||||
|
default:
|
||||||
|
return new DirectListPanel(b);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private GetBeatmapSetsRequest getSetsRequest;
|
private GetBeatmapSetsRequest getSetsRequest;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user