public static void DebugKeysPatch(DebugWindowsOpener __instance) { if (Prefs.DevMode) { return; } if (!Settings.enableLog) { return; } if (KeyBindingDefOf.Dev_ToggleDebugLog.KeyDownEvent) { __instance.ToggleLogWindow(); Event.current.Use(); } if (KeyBindingDefOf.Dev_ToggleDebugActionsMenu.KeyDownEvent) { __instance.ToggleDebugActionsMenu(); Event.current.Use(); } if (KeyBindingDefOf.Dev_ToggleDebugLogMenu.KeyDownEvent) { __instance.ToggleDebugLogMenu(); Event.current.Use(); } if (KeyBindingDefOf.Dev_ToggleDebugSettingsMenu.KeyDownEvent) { __instance.ToggleDebugSettingsMenu(); Event.current.Use(); } if (KeyBindingDefOf.Dev_ToggleDebugInspector.KeyDownEvent) { __instance.ToggleDebugInspector(); Event.current.Use(); } if (Current.ProgramState == ProgramState.Playing && KeyBindingDefOf.Dev_ToggleGodMode.KeyDownEvent) { __instance.ToggleGodMode(); Event.current.Use(); } }
public DebugWindowsOpenerComponent(DebugWindowsOpener debugWindowsOpener) { this.debugWindowsOpener = debugWindowsOpener; }