mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 11:39:45 +00:00
18 lines
598 B
C#
18 lines
598 B
C#
namespace MiraAPI.Keybinds;
|
|
|
|
/// <summary>
|
|
/// Singleton for getting a <see cref="VanillaKeybind"/> by <see cref="ActionButton"/>.
|
|
/// </summary>
|
|
/// <typeparam name="T"><see cref="AccountButton"/> type.</typeparam>
|
|
public static class VanillaKeybinding<T> where T : ActionButton
|
|
{
|
|
private static VanillaKeybind? _instance;
|
|
|
|
/// <summary>
|
|
/// Gets the instance of the <see cref="VanillaKeybind"/>.
|
|
/// </summary>
|
|
#pragma warning disable CA1000
|
|
public static VanillaKeybind Instance => _instance ??= KeybindManager.VanillaKeybinds[typeof(T)];
|
|
#pragma warning restore CA1000
|
|
}
|