1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 14:02:55 +08:00

Update ModPresetPanel.FilterTerms to account mod names and acronyms

This commit is contained in:
Cootz 2023-05-05 09:52:09 +03:00
parent 54757df51f
commit ab94b4dce1

View File

@ -83,11 +83,20 @@ namespace osu.Game.Overlays.Mods
#region Filtering support
public override IEnumerable<LocalisableString> FilterTerms => new LocalisableString[]
public override IEnumerable<LocalisableString> FilterTerms => getFilterTerms();
private IEnumerable<LocalisableString> getFilterTerms()
{
Preset.Value.Name,
Preset.Value.Description
};
yield return Preset.Value.Name;
yield return Preset.Value.Description;
foreach (Mod mod in Preset.Value.Mods)
{
yield return mod.Name;
yield return mod.Acronym;
yield return mod.Description;
}
}
#endregion