mirror of
https://github.com/ppy/osu.git
synced 2025-03-29 06:27:34 +08:00
Standardise ordering/grouping of IRulesetInfo
/RulesetInfo
s
This commit is contained in:
parent
26839f6ad8
commit
6f0e32826c
osu.Game
Beatmaps/Drawables
Screens
@ -33,7 +33,7 @@ namespace osu.Game.Beatmaps.Drawables.Cards
|
|||||||
|
|
||||||
bool firstGroup = true;
|
bool firstGroup = true;
|
||||||
|
|
||||||
foreach (var group in beatmapSetInfo.Beatmaps.GroupBy(beatmap => beatmap.Ruleset.OnlineID).OrderBy(group => group.Key))
|
foreach (var group in beatmapSetInfo.Beatmaps.GroupBy(beatmap => beatmap.Ruleset).OrderBy(group => group.Key))
|
||||||
{
|
{
|
||||||
if (!firstGroup)
|
if (!firstGroup)
|
||||||
{
|
{
|
||||||
|
@ -62,10 +62,8 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
// matching web: https://github.com/ppy/osu-web/blob/d06d8c5e735eb1f48799b1654b528e9a7afb0a35/resources/assets/lib/beatmapset-panel.tsx#L127
|
// matching web: https://github.com/ppy/osu-web/blob/d06d8c5e735eb1f48799b1654b528e9a7afb0a35/resources/assets/lib/beatmapset-panel.tsx#L127
|
||||||
bool collapsed = beatmapSet.Beatmaps.Count() > 12;
|
bool collapsed = beatmapSet.Beatmaps.Count() > 12;
|
||||||
|
|
||||||
foreach (var rulesetGrouping in beatmapSet.Beatmaps.GroupBy(beatmap => beatmap.Ruleset.OnlineID).OrderBy(group => group.Key))
|
foreach (var rulesetGrouping in beatmapSet.Beatmaps.GroupBy(beatmap => beatmap.Ruleset).OrderBy(group => group.Key))
|
||||||
{
|
flow.Add(new RulesetDifficultyGroup(rulesetGrouping.Key.OnlineID, rulesetGrouping, collapsed));
|
||||||
flow.Add(new RulesetDifficultyGroup(rulesetGrouping.Key, rulesetGrouping, collapsed));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -851,7 +851,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
var difficultyItems = new List<MenuItem>();
|
var difficultyItems = new List<MenuItem>();
|
||||||
|
|
||||||
foreach (var rulesetBeatmaps in beatmapSet.Beatmaps.GroupBy(b => b.Ruleset.ShortName).OrderBy(group => group.Key))
|
foreach (var rulesetBeatmaps in beatmapSet.Beatmaps.GroupBy(b => b.Ruleset).OrderBy(group => group.Key))
|
||||||
{
|
{
|
||||||
if (difficultyItems.Count > 0)
|
if (difficultyItems.Count > 0)
|
||||||
difficultyItems.Add(new EditorMenuItemSpacer());
|
difficultyItems.Add(new EditorMenuItemSpacer());
|
||||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
var beatmaps = carouselSet.Beatmaps.ToList();
|
var beatmaps = carouselSet.Beatmaps.ToList();
|
||||||
|
|
||||||
return beatmaps.Count > maximum_difficulty_icons
|
return beatmaps.Count > maximum_difficulty_icons
|
||||||
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.BeatmapInfo.Ruleset.ShortName)
|
? (IEnumerable<DifficultyIcon>)beatmaps.GroupBy(b => b.BeatmapInfo.Ruleset)
|
||||||
.Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Last().BeatmapInfo.Ruleset))
|
.Select(group => new FilterableGroupedDifficultyIcon(group.ToList(), group.Last().BeatmapInfo.Ruleset))
|
||||||
: beatmaps.Select(b => new FilterableDifficultyIcon(b));
|
: beatmaps.Select(b => new FilterableDifficultyIcon(b));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user