mirror of https://github.com/hykilpikonna/AquaDX
16 lines
577 B
C#
16 lines
577 B
C#
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;
|
|
}
|
|
}
|