using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework.Input;
namespace MLEM.Misc {
///
/// A helper class that allows easier usage of values.
///
public static class EnumHelper {
///
/// All values of the enum.
///
public static readonly Buttons[] Buttons = GetValues().ToArray();
///
/// All values of the enum.
///
public static readonly Keys[] Keys = GetValues().ToArray();
///
/// Returns all of the values of the given enum type.
///
/// The type whose enum to get
/// An enumerable of the values of the enum, in declaration order.
public static IEnumerable GetValues() {
return Enum.GetValues(typeof(T)).Cast();
}
}
}