1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Store raw BeatmapCollection in filter control

This commit is contained in:
smoogipoo 2020-09-09 23:10:21 +09:00
parent af412947b2
commit 43525614ad
4 changed files with 5 additions and 4 deletions

View File

@ -204,7 +204,7 @@ namespace osu.Game.Tests.Visual.SongSelect
InputManager.Click(MouseButton.Left);
});
AddAssert("collection filter still selected", () => control.CreateCriteria().Collection?.CollectionName.Value == "1");
AddAssert("collection filter still selected", () => control.CreateCriteria().Collection?.Name.Value == "1");
}
private void assertCollectionHeaderDisplays(string collectionName, bool shouldDisplay = true)

View File

@ -61,7 +61,7 @@ namespace osu.Game.Screens.Select.Carousel
}
if (match)
match &= criteria.Collection?.ContainsBeatmap(Beatmap) ?? true;
match &= criteria.Collection?.Beatmaps.Contains(Beatmap) ?? true;
Filtered.Value = !match;
}

View File

@ -42,7 +42,7 @@ namespace osu.Game.Screens.Select
Sort = sortMode.Value,
AllowConvertedBeatmaps = showConverted.Value,
Ruleset = ruleset.Value,
Collection = collectionDropdown?.Current.Value
Collection = collectionDropdown?.Current.Value.Collection
};
if (!minimumStars.IsDefault)

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using osu.Game.Beatmaps;
using osu.Game.Collections;
using osu.Game.Rulesets;
using osu.Game.Screens.Select.Filter;
@ -56,7 +57,7 @@ namespace osu.Game.Screens.Select
/// The collection to filter beatmaps from.
/// </summary>
[CanBeNull]
public CollectionFilter Collection;
public BeatmapCollection Collection;
public struct OptionalRange<T> : IEquatable<OptionalRange<T>>
where T : struct