mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 18:43:22 +08:00
Merge pull request #29273 from Joehuu/enum-description-searching
Allow searching enum descriptions from `SettingsEnumDropdown`s
This commit is contained in:
commit
48b320e7dd
@ -2,7 +2,11 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Game.Overlays.Settings
|
||||
@ -10,6 +14,8 @@ namespace osu.Game.Overlays.Settings
|
||||
public partial class SettingsEnumDropdown<T> : SettingsDropdown<T>
|
||||
where T : struct, Enum
|
||||
{
|
||||
public override IEnumerable<LocalisableString> FilterTerms => base.FilterTerms.Concat(Control.Items.Select(i => i.GetLocalisableDescription()));
|
||||
|
||||
protected override OsuDropdown<T> CreateDropdown() => new DropdownControl();
|
||||
|
||||
protected new partial class DropdownControl : OsuEnumDropdown<T>
|
||||
|
Loading…
Reference in New Issue
Block a user