[+] Custom Keymap

This commit is contained in:
Clansty
2024-10-02 14:41:20 +08:00
parent c15dcf6b98
commit 1bcb7210c6
2 changed files with 34 additions and 5 deletions

View File

@@ -1,6 +1,15 @@
namespace AquaMai.CustomKeyMap;
using DB;
using HarmonyLib;
namespace AquaMai.CustomKeyMap;
public class Enable
{
}
[HarmonyPatch(typeof(JvsButtonTableRecord), MethodType.Constructor, typeof(int), typeof(string), typeof(string), typeof(int), typeof(string), typeof(int), typeof(int), typeof(int))]
[HarmonyPostfix]
public static void JvsButtonTableRecordConstructor(JvsButtonTableRecord __instance, string Name)
{
var prop = (DB.KeyCodeID)typeof(Config.CustomKeyMapConfig).GetProperty(Name).GetValue(AquaMai.AppConfig.CustomKeyMap);
__instance.SubstituteKey = prop;
}
}