Initial commit
This commit is contained in:
48
mod/Patches/Screen.cs
Normal file
48
mod/Patches/Screen.cs
Normal 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);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user