mirror of
https://github.com/osukey/osukey.git
synced 2025-05-06 06:07:26 +09:00
Sort by difficulty and fix relationship
This commit is contained in:
parent
8d6431b35e
commit
42f8d19c73
@ -127,6 +127,11 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
return connection.GetAllWithChildren<T>(filter, recursive);
|
return connection.GetAllWithChildren<T>(filter, recursive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void GetChildren<T>(T item, bool recursive = true)
|
||||||
|
{
|
||||||
|
connection.GetChildren<T>(item, recursive);
|
||||||
|
}
|
||||||
|
|
||||||
readonly Type[] validTypes = new[]
|
readonly Type[] validTypes = new[]
|
||||||
{
|
{
|
||||||
|
@ -217,12 +217,12 @@ namespace osu.Game.GameModes.Play
|
|||||||
// TODO: Make these italic
|
// TODO: Make these italic
|
||||||
new SpriteText
|
new SpriteText
|
||||||
{
|
{
|
||||||
Text = this.beatmapSet.Metadata.TitleUnicode ?? this.beatmapSet.Metadata.Title,
|
Text = this.beatmapSet.Metadata.Title ?? this.beatmapSet.Metadata.TitleUnicode,
|
||||||
TextSize = 20
|
TextSize = 20
|
||||||
},
|
},
|
||||||
new SpriteText
|
new SpriteText
|
||||||
{
|
{
|
||||||
Text = this.beatmapSet.Metadata.ArtistUnicode ?? this.beatmapSet.Metadata.Artist,
|
Text = this.beatmapSet.Metadata.Artist ?? this.beatmapSet.Metadata.ArtistUnicode,
|
||||||
TextSize = 16
|
TextSize = 16
|
||||||
},
|
},
|
||||||
new FlowContainer
|
new FlowContainer
|
||||||
|
@ -59,6 +59,9 @@ namespace osu.Game.GameModes.Play
|
|||||||
private void addBeatmapSet(BeatmapSetInfo beatmapSet)
|
private void addBeatmapSet(BeatmapSetInfo beatmapSet)
|
||||||
{
|
{
|
||||||
beatmapSet = beatmaps.GetWithChildren<BeatmapSetInfo>(beatmapSet.BeatmapSetID);
|
beatmapSet = beatmaps.GetWithChildren<BeatmapSetInfo>(beatmapSet.BeatmapSetID);
|
||||||
|
beatmapSet.Beatmaps.ForEach(b => beatmaps.GetChildren(b));
|
||||||
|
beatmapSet.Beatmaps = beatmapSet.Beatmaps.OrderBy(b => b.BaseDifficulty.OverallDifficulty)
|
||||||
|
.ToList();
|
||||||
var group = new BeatmapGroup(beatmapSet, beatmapResources, beatmapTextureResources);
|
var group = new BeatmapGroup(beatmapSet, beatmapResources, beatmapTextureResources);
|
||||||
group.SetSelected += selectBeatmapSet;
|
group.SetSelected += selectBeatmapSet;
|
||||||
group.BeatmapSelected += selectBeatmap;
|
group.BeatmapSelected += selectBeatmap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user