mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-28 19:43:55 +00:00
20 lines
527 B
C#
20 lines
527 B
C#
using HarmonyLib;
|
|
using MiraAPI.Keybinds;
|
|
using Rewired;
|
|
|
|
namespace MiraAPI.Patches.Keybinds
|
|
{
|
|
[HarmonyPatch(typeof(InputManager_Base), nameof(InputManager_Base.Awake))]
|
|
public static class KeybindMenuPatch
|
|
{
|
|
[HarmonyPrefix]
|
|
private static void StartPrefix(InputManager_Base __instance)
|
|
{
|
|
foreach (var entry in KeybindManager.GetEntries())
|
|
{
|
|
__instance.userData.RegisterModBind(entry.Id, entry.Description, entry.Key);
|
|
}
|
|
}
|
|
}
|
|
}
|