mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Split out simple DifficultyIcon
with no calculation overhead and update usages
This commit is contained in:
@ -73,7 +73,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
TextPadding = new MarginPadding { Horizontal = 8, Vertical = 2 },
|
||||
Status = beatmapSet.Status
|
||||
},
|
||||
new FillFlowContainer<DifficultyIcon>
|
||||
new FillFlowContainer<CalculatingDifficultyIcon>
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Spacing = new Vector2(3),
|
||||
@ -87,13 +87,13 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
private const int maximum_difficulty_icons = 18;
|
||||
|
||||
private IEnumerable<DifficultyIcon> getDifficultyIcons()
|
||||
private IEnumerable<CalculatingDifficultyIcon> getDifficultyIcons()
|
||||
{
|
||||
var beatmaps = carouselSet.Beatmaps.ToList();
|
||||
|
||||
return beatmaps.Count > maximum_difficulty_icons
|
||||
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.BeatmapInfo.Ruleset)
|
||||
.Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Last().BeatmapInfo.Ruleset))
|
||||
? (IEnumerable<CalculatingDifficultyIcon>)beatmaps.GroupBy(b => b.BeatmapInfo.Ruleset)
|
||||
.Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Last().BeatmapInfo.Ruleset))
|
||||
: beatmaps.Select(b => new FilterableDifficultyIcon(b));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user