mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 15:57:24 +08:00
Merge pull request #27192 from smoogipoo/mod-search-ignore-whitespace
Adjust search terms for mods
This commit is contained in:
commit
6770b73e4e
@ -788,7 +788,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AddAssert("all columns visible", () => this.ChildrenOfType<ModColumn>().All(col => col.IsPresent));
|
AddAssert("all columns visible", () => this.ChildrenOfType<ModColumn>().All(col => col.IsPresent));
|
||||||
|
|
||||||
AddStep("set search", () => modSelectOverlay.SearchTerm = "HD");
|
AddStep("set search", () => modSelectOverlay.SearchTerm = "HD");
|
||||||
AddAssert("one column visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 1);
|
AddAssert("two columns visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 2);
|
||||||
|
|
||||||
AddStep("filter out everything", () => modSelectOverlay.SearchTerm = "Some long search term with no matches");
|
AddStep("filter out everything", () => modSelectOverlay.SearchTerm = "Some long search term with no matches");
|
||||||
AddAssert("no columns visible", () => this.ChildrenOfType<ModColumn>().All(col => !col.IsPresent));
|
AddAssert("no columns visible", () => this.ChildrenOfType<ModColumn>().All(col => !col.IsPresent));
|
||||||
@ -812,7 +812,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AddAssert("all columns visible", () => this.ChildrenOfType<ModColumn>().All(col => col.IsPresent));
|
AddAssert("all columns visible", () => this.ChildrenOfType<ModColumn>().All(col => col.IsPresent));
|
||||||
|
|
||||||
AddStep("set search", () => modSelectOverlay.SearchTerm = "fail");
|
AddStep("set search", () => modSelectOverlay.SearchTerm = "fail");
|
||||||
AddAssert("one column visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 2);
|
AddAssert("one column visible", () => this.ChildrenOfType<ModColumn>().Count(col => col.IsPresent) == 1);
|
||||||
|
|
||||||
AddStep("hide", () => modSelectOverlay.Hide());
|
AddStep("hide", () => modSelectOverlay.Hide());
|
||||||
AddStep("show", () => modSelectOverlay.Show());
|
AddStep("show", () => modSelectOverlay.Show());
|
||||||
|
@ -77,11 +77,11 @@ namespace osu.Game.Overlays.Mods
|
|||||||
/// <seealso cref="ModState.Visible"/>
|
/// <seealso cref="ModState.Visible"/>
|
||||||
public bool Visible => modState.Visible;
|
public bool Visible => modState.Visible;
|
||||||
|
|
||||||
public override IEnumerable<LocalisableString> FilterTerms => new[]
|
public override IEnumerable<LocalisableString> FilterTerms => new LocalisableString[]
|
||||||
{
|
{
|
||||||
Mod.Name,
|
Mod.Name,
|
||||||
|
Mod.Name.Replace(" ", string.Empty),
|
||||||
Mod.Acronym,
|
Mod.Acronym,
|
||||||
Mod.Description
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public override bool MatchingFilter
|
public override bool MatchingFilter
|
||||||
|
Loading…
Reference in New Issue
Block a user