mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
Merge pull request #2394 from UselessToucan/beatmap_set_overlay_difficulties_ordering
Fix incorrect ordering of difficulties retrieved from API
This commit is contained in:
commit
06efddd4b4
@ -44,7 +44,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
Beatmap.Value = BeatmapSet.Beatmaps.First();
|
||||
plays.Value = BeatmapSet.OnlineInfo.PlayCount;
|
||||
favourites.Value = BeatmapSet.OnlineInfo.FavouriteCount;
|
||||
difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.Select(b => new DifficultySelectorButton(b)
|
||||
difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.OrderBy(beatmap => beatmap.StarDifficulty).Select(b => new DifficultySelectorButton(b)
|
||||
{
|
||||
State = DifficultySelectorState.NotSelected,
|
||||
OnHovered = beatmap =>
|
||||
|
@ -2,6 +2,7 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using OpenTK;
|
||||
@ -208,7 +209,7 @@ namespace osu.Game.Overlays.Direct
|
||||
{
|
||||
var icons = new List<DifficultyIcon>();
|
||||
|
||||
foreach (var b in SetInfo.Beatmaps)
|
||||
foreach (var b in SetInfo.Beatmaps.OrderBy(beatmap => beatmap.StarDifficulty))
|
||||
icons.Add(new DifficultyIcon(b));
|
||||
|
||||
return icons;
|
||||
|
Loading…
Reference in New Issue
Block a user