mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Apply NRT to FilterCriteria
This commit is contained in:
parent
6ec8ccda11
commit
14c95f4584
@ -210,7 +210,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
InputManager.Click(MouseButton.Left);
|
InputManager.Click(MouseButton.Left);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddAssert("collection filter still selected", () => control.CreateCriteria().CollectionBeatmapMD5Hashes.Any());
|
AddAssert("collection filter still selected", () => control.CreateCriteria().CollectionBeatmapMD5Hashes?.Any() ?? false);
|
||||||
|
|
||||||
AddAssert("filter request not fired", () => !received);
|
AddAssert("filter request not fired", () => !received);
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
#nullable enable
|
||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Collections;
|
using osu.Game.Collections;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
@ -20,7 +18,7 @@ namespace osu.Game.Screens.Select
|
|||||||
public GroupMode Group;
|
public GroupMode Group;
|
||||||
public SortMode Sort;
|
public SortMode Sort;
|
||||||
|
|
||||||
public BeatmapSetInfo SelectedBeatmapSet;
|
public BeatmapSetInfo? SelectedBeatmapSet;
|
||||||
|
|
||||||
public OptionalRange<double> StarDifficulty;
|
public OptionalRange<double> StarDifficulty;
|
||||||
public OptionalRange<float> ApproachRate;
|
public OptionalRange<float> ApproachRate;
|
||||||
@ -42,10 +40,10 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public string[] SearchTerms = Array.Empty<string>();
|
public string[] SearchTerms = Array.Empty<string>();
|
||||||
|
|
||||||
public RulesetInfo Ruleset;
|
public RulesetInfo? Ruleset;
|
||||||
public bool AllowConvertedBeatmaps;
|
public bool AllowConvertedBeatmaps;
|
||||||
|
|
||||||
private string searchText;
|
private string searchText = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <see cref="SearchText"/> as a number (if it can be parsed as one).
|
/// <see cref="SearchText"/> as a number (if it can be parsed as one).
|
||||||
@ -70,11 +68,9 @@ namespace osu.Game.Screens.Select
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hashes from the <see cref="BeatmapCollection"/> to filter to.
|
/// Hashes from the <see cref="BeatmapCollection"/> to filter to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[CanBeNull]
|
public IEnumerable<string>? CollectionBeatmapMD5Hashes { get; set; }
|
||||||
public IEnumerable<string> CollectionBeatmapMD5Hashes { get; set; }
|
|
||||||
|
|
||||||
[CanBeNull]
|
public IRulesetFilterCriteria? RulesetCriteria { get; set; }
|
||||||
public IRulesetFilterCriteria RulesetCriteria { get; set; }
|
|
||||||
|
|
||||||
public struct OptionalRange<T> : IEquatable<OptionalRange<T>>
|
public struct OptionalRange<T> : IEquatable<OptionalRange<T>>
|
||||||
where T : struct
|
where T : struct
|
||||||
|
Loading…
Reference in New Issue
Block a user