mirror of
https://github.com/ppy/osu.git
synced 2025-03-04 07:43:10 +08:00
Allow searching enum descriptions from SettingsEnumDropdown
s
This commit is contained in:
parent
7765d0ff70
commit
2daf1b58f2
@ -2,7 +2,11 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using osu.Framework.Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Localisation;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings
|
namespace osu.Game.Overlays.Settings
|
||||||
@ -10,6 +14,8 @@ namespace osu.Game.Overlays.Settings
|
|||||||
public partial class SettingsEnumDropdown<T> : SettingsDropdown<T>
|
public partial class SettingsEnumDropdown<T> : SettingsDropdown<T>
|
||||||
where T : struct, Enum
|
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 override OsuDropdown<T> CreateDropdown() => new DropdownControl();
|
||||||
|
|
||||||
protected new partial class DropdownControl : OsuEnumDropdown<T>
|
protected new partial class DropdownControl : OsuEnumDropdown<T>
|
||||||
|
Loading…
Reference in New Issue
Block a user