Enum constraint for enum dropdown.

This commit is contained in:
Huo Yaoyuan
2019-12-07 19:56:56 +08:00
parent 40a5c1fd96
commit c3518a2b94
7 changed files with 26 additions and 21 deletions

View File

@ -1,12 +1,14 @@
// 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.
using System;
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
{
public class SettingsEnumDropdown<T> : SettingsDropdown<T>
where T : struct, Enum
{
protected override OsuDropdown<T> CreateDropdown() => new DropdownControl();