mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +00:00
Add sorting by BPM
This commit is contained in:
parent
ffc3c9f8f6
commit
188c80374e
@ -271,7 +271,11 @@ namespace osu.Game.Beatmaps
|
|||||||
OnlineBeatmapSetID = beatmap.BeatmapInfo.BeatmapSet?.OnlineBeatmapSetID,
|
OnlineBeatmapSetID = beatmap.BeatmapInfo.BeatmapSet?.OnlineBeatmapSetID,
|
||||||
Beatmaps = new List<BeatmapInfo>(),
|
Beatmaps = new List<BeatmapInfo>(),
|
||||||
Metadata = beatmap.Metadata,
|
Metadata = beatmap.Metadata,
|
||||||
DateAdded = DateTimeOffset.UtcNow
|
DateAdded = DateTimeOffset.UtcNow,
|
||||||
|
OnlineInfo = new BeatmapSetOnlineInfo
|
||||||
|
{
|
||||||
|
BPM = beatmap.ControlPointInfo.BPMMode,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,6 +48,9 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
case SortMode.DateAdded:
|
case SortMode.DateAdded:
|
||||||
return otherSet.BeatmapSet.DateAdded.CompareTo(BeatmapSet.DateAdded);
|
return otherSet.BeatmapSet.DateAdded.CompareTo(BeatmapSet.DateAdded);
|
||||||
|
|
||||||
|
case SortMode.BPM:
|
||||||
|
return BeatmapSet.OnlineInfo.BPM.CompareTo(otherSet.BeatmapSet.OnlineInfo.BPM);
|
||||||
|
|
||||||
case SortMode.Difficulty:
|
case SortMode.Difficulty:
|
||||||
return BeatmapSet.MaxStarDifficulty.CompareTo(otherSet.BeatmapSet.MaxStarDifficulty);
|
return BeatmapSet.MaxStarDifficulty.CompareTo(otherSet.BeatmapSet.MaxStarDifficulty);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user