mirror of
https://github.com/ppy/osu.git
synced 2026-06-02 12:10:12 +08:00
Display separate design for beatmap panels on difficulty sort mode
This commit is contained in:
committed by
Dean Herbert
Unverified
parent
a360f153f7
commit
f58cf8e971
@@ -47,7 +47,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
return SPACING * 2;
|
||||
|
||||
// Beatmap difficulty panels do not overlap with themselves or any other panel.
|
||||
if (top.Model is BeatmapInfo || bottom.Model is BeatmapInfo)
|
||||
if (grouping.BeatmapSetsGroupedTogether && (top.Model is BeatmapInfo || bottom.Model is BeatmapInfo))
|
||||
return SPACING;
|
||||
|
||||
return -SPACING;
|
||||
@@ -365,6 +365,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
#region Drawable pooling
|
||||
|
||||
private readonly DrawablePool<PanelBeatmap> beatmapPanelPool = new DrawablePool<PanelBeatmap>(100);
|
||||
private readonly DrawablePool<PanelBeatmapStandalone> standalonePanelPool = new DrawablePool<PanelBeatmapStandalone>(100);
|
||||
private readonly DrawablePool<PanelBeatmapSet> setPanelPool = new DrawablePool<PanelBeatmapSet>(100);
|
||||
private readonly DrawablePool<PanelGroup> groupPanelPool = new DrawablePool<PanelGroup>(100);
|
||||
private readonly DrawablePool<PanelGroupStarDifficulty> starsGroupPanelPool = new DrawablePool<PanelGroupStarDifficulty>(11);
|
||||
@@ -374,6 +375,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
AddInternal(starsGroupPanelPool);
|
||||
AddInternal(groupPanelPool);
|
||||
AddInternal(beatmapPanelPool);
|
||||
AddInternal(standalonePanelPool);
|
||||
AddInternal(setPanelPool);
|
||||
}
|
||||
|
||||
@@ -406,8 +408,9 @@ namespace osu.Game.Screens.SelectV2
|
||||
return groupPanelPool.Get();
|
||||
|
||||
case BeatmapInfo:
|
||||
// TODO: if beatmap is a group selection target, it needs to be a different drawable
|
||||
// with more information attached.
|
||||
if (!grouping.BeatmapSetsGroupedTogether)
|
||||
return standalonePanelPool.Get();
|
||||
|
||||
return beatmapPanelPool.Get();
|
||||
|
||||
case BeatmapSetInfo:
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace osu.Game.Screens.SelectV2
|
||||
HashSet<CarouselItem>? currentGroupItems = null;
|
||||
HashSet<CarouselItem>? currentSetItems = null;
|
||||
|
||||
BeatmapSetsGroupedTogether = criteria.Group != GroupMode.Difficulty;
|
||||
BeatmapSetsGroupedTogether = criteria.Sort != SortMode.Difficulty;
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
@@ -100,6 +100,8 @@ namespace osu.Game.Screens.SelectV2
|
||||
{
|
||||
if (lastGroupItem != null)
|
||||
lastGroupItem.NestedItemCount++;
|
||||
|
||||
item.DrawHeight = PanelBeatmapStandalone.HEIGHT;
|
||||
}
|
||||
|
||||
addItem(item);
|
||||
|
||||
Reference in New Issue
Block a user