1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-06-08 07:43:37 +02:00
MLEM/MLEM/Misc/EnumHelper.cs
2019-09-09 20:56:10 +02:00

17 lines
451 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework.Input;
namespace MLEM.Misc {
public static class EnumHelper {
public static readonly Buttons[] Buttons = GetValues<Buttons>().ToArray();
public static readonly Keys[] Keys = GetValues<Keys>().ToArray();
public static IEnumerable<T> GetValues<T>() {
return Enum.GetValues(typeof(T)).Cast<T>();
}
}
}