mirror of
https://github.com/ppy/osu.git
synced 2026-05-25 18:30:21 +08:00
Add a new Rank Achieved panel to BeatmapCarousel.cs
This commit is contained in:
@@ -788,9 +788,11 @@ namespace osu.Game.Screens.SelectV2
|
||||
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);
|
||||
private readonly DrawablePool<PanelGroupRankDisplay> ranksGroupPanelPool = new DrawablePool<PanelGroupRankDisplay>(11);
|
||||
|
||||
private void setupPools()
|
||||
{
|
||||
AddInternal(ranksGroupPanelPool);
|
||||
AddInternal(starsGroupPanelPool);
|
||||
AddInternal(groupPanelPool);
|
||||
AddInternal(beatmapPanelPool);
|
||||
@@ -829,6 +831,9 @@ namespace osu.Game.Screens.SelectV2
|
||||
case StarDifficultyGroupDefinition:
|
||||
return starsGroupPanelPool.Get();
|
||||
|
||||
case RankDisplayGroupDefinition:
|
||||
return ranksGroupPanelPool.Get();
|
||||
|
||||
case GroupDefinition:
|
||||
return groupPanelPool.Get();
|
||||
|
||||
@@ -1085,6 +1090,11 @@ namespace osu.Game.Screens.SelectV2
|
||||
/// </summary>
|
||||
public record StarDifficultyGroupDefinition(int Order, string Title, StarDifficulty Difficulty) : GroupDefinition(Order, Title);
|
||||
|
||||
/// <summary>
|
||||
/// Defines a grouping header for a set of carousel items grouped by achieved rank.
|
||||
/// </summary>
|
||||
public record RankDisplayGroupDefinition(int Order, string Title, ScoreRank Rank) : GroupDefinition(Order, Title);
|
||||
|
||||
/// <summary>
|
||||
/// Used to represent a portion of a <see cref="BeatmapSetInfo"/> under a <see cref="GroupDefinition"/>.
|
||||
/// The purpose of this model is to support splitting beatmap sets apart when the active grouping mode demands it.
|
||||
|
||||
Reference in New Issue
Block a user