Initial commit

This commit is contained in:
2022-12-30 00:58:33 +01:00
commit 3f1075e67f
176 changed files with 25715 additions and 0 deletions

48
mod/Patches/Screen.cs Normal file
View File

@@ -0,0 +1,48 @@
// Generic place to intercept screen functions that are not overriden
using System;
using HarmonyLib;
using UnityEngine;
namespace PriorityUX {
// [HarmonyPatch(typeof(KScreen))]
// static class ScreenKeyPatches {
// [HarmonyPatch("OnKeyDown")]
// [HarmonyPostfix]
// static void OnKeyDown_Postfix(KButtonEvent e, object __instance) {
// // Debug.Log("KeyDown " + e + " " + __instance);
// // Debug.Log(Environment.StackTrace);
// // if (__instance is MaterialSelectionPanel msp) {
// // Debug.Log("KD> Material Selection");
// // }
// // if (__instance is MaterialSelectionPanel msp) {
// // Debug.Log("[PriorityUX] >> Redirect MaterialSelectionPanel KeyDown");
// // Debug.Log(msp);
// // MaterialSelectionPanelPatches.OnKeyDown(e, msp);
// // }
// }
// [HarmonyPatch("OnKeyUp")]
// [HarmonyPostfix]
// static void OnKeyUp_Postfix(KButtonEvent e, object __instance) {
// // if (__instance is MaterialSelectionPanel msp) {
// // Debug.Log("[PriorityUX] >> Redirect MaterialSelectionPanel KeyUp");
// // Debug.Log(msp);
// // MaterialSelectionPanelPatches.OnKeyUp(e, msp);
// // }
// }
// }
// [HarmonyPatch(typeof(KIconToggleMenu))]
// static class Test {
// [HarmonyPatch("OnKeyDown")]
// [HarmonyPostfix]
// static void OnKeyDown_Postfix(KButtonEvent e, object __instance) {
// // Debug.Log("KIconToggleMenu KeyDown " + e + " " + __instance);
// // Debug.Log(Environment.StackTrace);
// }
// }
}