public void Handle(Int32 Int1, InputActionTypeData InputActionType) { if (ArcenUI.Instance.ShowingConsole) { return; } switch (InputActionType.InternalName) { case "TriggerCurrentMasterMenuAction_1": case "TriggerCurrentMasterMenuAction_2": case "TriggerCurrentMasterMenuAction_3": case "TriggerCurrentMasterMenuAction_4": case "TriggerCurrentMasterMenuAction_5": case "TriggerCurrentMasterMenuAction_6": case "TriggerCurrentMasterMenuAction_7": case "TriggerCurrentMasterMenuAction_8": case "TriggerCurrentMasterMenuAction_9": case "TriggerCurrentMasterMenuAction_10": { ArcenUI_Window window = GetCurrentBottommostMasterMenu(); { ToggleableWindowController windowControllerThatIsOpen; WindowTogglingButtonController buttonControllerThatWillCloseIt; GetTopmostOpenMasterMenuWindow(window, out windowControllerThatIsOpen, out buttonControllerThatWillCloseIt); if (windowControllerThatIsOpen != null && windowControllerThatIsOpen.SupportsMasterMenuKeys) { window = windowControllerThatIsOpen.Window; } } int targetButtonIndex = InputActionType.RelatedInt1 - 1; IArcenUI_Button_Controller targetButtonController = GetButtonByIndex(window, targetButtonIndex); if (targetButtonController == null) { break; } targetButtonController.HandleClick(); } break; case "MasterMenuBack": { ToggleableWindowController windowControllerThatIsOpen; WindowTogglingButtonController buttonControllerThatWillCloseIt; GetTopmostOpenMasterMenuWindow(GetCurrentBottommostMasterMenu(), out windowControllerThatIsOpen, out buttonControllerThatWillCloseIt); if (buttonControllerThatWillCloseIt == null || windowControllerThatIsOpen == null) { if (Engine_AIW2.Instance.GetHasSelection()) { Engine_AIW2.Instance.ClearSelection(); } break; } buttonControllerThatWillCloseIt.HandleClick(); } break; } }
public void Handle(Int32 Int1, InputActionTypeData InputActionType) { if (ArcenUI.CurrentlyShownWindowsWith_PreventsNormalInputHandlers.Count > 0) { return; } if (ArcenUI.Instance.ShowingConsole) { return; } switch (InputActionType.InternalName) { case "TriggerCurrentMasterMenuAction_1": case "TriggerCurrentMasterMenuAction_2": case "TriggerCurrentMasterMenuAction_3": case "TriggerCurrentMasterMenuAction_4": case "TriggerCurrentMasterMenuAction_5": case "TriggerCurrentMasterMenuAction_6": case "TriggerCurrentMasterMenuAction_7": case "TriggerCurrentMasterMenuAction_8": case "TriggerCurrentMasterMenuAction_9": case "TriggerCurrentMasterMenuAction_10": { int targetButtonIndex = InputActionType.RelatedInt1 - 1; if (Window_InGameBuildTypeIconMenu.Instance.IsOpen) { if (Window_InGameBuildTypeIconMenu.Instance.CurrentTypeIndex < 0) { Window_InGameBuildTypeIconMenu.Instance.CurrentTypeIndex = targetButtonIndex; } else { if (Window_InGameBuildTypeIconMenu.Instance.LastShownItems.Count > Window_InGameBuildTypeIconMenu.Instance.CurrentTypeIndex) { List <Window_InGameBuildTypeIconMenu.bItem> buttonList = Window_InGameBuildTypeIconMenu.Instance.LastShownItems[Window_InGameBuildTypeIconMenu.Instance.CurrentTypeIndex]; if (buttonList.Count > targetButtonIndex) { Window_InGameBuildTypeIconMenu.bItem button = buttonList[targetButtonIndex]; if (button != null) { button.HandleClick(); } } } } } else if (Window_InGameTechTypeIconMenu.Instance.IsOpen) { if (Window_InGameTechTypeIconMenu.Instance.CurrentTypeIndex < 0) { Window_InGameTechTypeIconMenu.Instance.CurrentTypeIndex = targetButtonIndex; } else { if (Window_InGameTechTypeIconMenu.Instance.LastShownItems.Count > Window_InGameTechTypeIconMenu.Instance.CurrentTypeIndex) { List <Window_InGameTechTypeIconMenu.bItem> buttonList = Window_InGameTechTypeIconMenu.Instance.LastShownItems[Window_InGameTechTypeIconMenu.Instance.CurrentTypeIndex]; if (buttonList.Count > targetButtonIndex) { Window_InGameTechTypeIconMenu.bItem button = buttonList[targetButtonIndex]; if (button != null) { button.HandleClick(); } } } } } else { ArcenUI_Window window = GetCurrentBottommostMasterMenu(); { ToggleableWindowController windowControllerThatIsOpen; WindowTogglingButtonController buttonControllerThatWillCloseIt; GetTopmostOpenMasterMenuWindow(window, out windowControllerThatIsOpen, out buttonControllerThatWillCloseIt); if (windowControllerThatIsOpen != null && windowControllerThatIsOpen.SupportsMasterMenuKeys) { window = windowControllerThatIsOpen.Window; } } IArcenUI_Button_Controller targetButtonController = GetButtonByIndex(window, targetButtonIndex); if (targetButtonController == null) { break; } targetButtonController.HandleClick(); } } break; case "OpenSystemMenu": { for (int i = 0; i < 20; i++) { BackUpOneStepInMasterMenu(); } Window_InGameBottomMenu.bToggleMasterMenu.Instance.HandleClick(); } break; case "MasterMenuBack": { BackUpOneStepInMasterMenu(); } break; } }
public void Handle(Int32 Int1, InputActionTypeData InputActionType) { HandleInner(Int1, InputActionType.InternalName); }