protected override void update_input(bool active) { if (!trading) { if (active) { if (Command_Window.is_canceled()) { Global.game_system.play_se(System_Sounds.Cancel); close(); } else if (Command_Window.is_selected()) { trade(); } else if (Command_Window.getting_help()) { } //Yeti } } else if (Giving || Restocking) { update_unit_inventory(active); } else { update_taking(active); } }
protected override void update_input(bool active) { StartButton.Update(active && input_ready); if (active && input_ready) { bool pressedStart = false; if (Global.Input.triggered(Inputs.Start) || this.start_ui_button_pressed) { pressedStart = true; } if (CommandWindow.is_selected()) { OnSelected(new EventArgs()); } else if (CommandWindow.is_canceled()) { command_window_canceled(); } else if (pressedStart) { OnStart(new EventArgs()); } } }
protected override bool CanceledTriggered(bool active) { bool cancel = base.CanceledTriggered(active); if (active) { cancel |= Window.is_canceled(); cancel |= Global.Input.mouse_click(MouseButtons.Right); } return(cancel); }
protected virtual bool CanceledTriggered(bool active) { bool cancel = Window.is_canceled(); if (CancelButton != null) { cancel |= CancelButton.consume_trigger(MouseButtons.Left) || CancelButton.consume_trigger(TouchGestures.Tap); } return(cancel); }
protected override void update_input(bool active) { if (active) { if (Command_Window.is_canceled()) { SelectedIndex = PrepCheckMapResults.Cancel; OnSelected(new EventArgs()); } else if (Command_Window.is_selected()) { OnSelected(new EventArgs()); } } }
private void UpdateInput(bool active) { bool cancel = CancelButton.consume_trigger(MouseButtons.Left) || CancelButton.consume_trigger(TouchGestures.Tap); bool changeDifficulty = active && Global.Input.triggered(Inputs.X); changeDifficulty |= DifficultyButton.consume_trigger(MouseButtons.Left) || DifficultyButton.consume_trigger(TouchGestures.Tap); // Selecting chapter if (this.SelectingChapter) { cancel |= CommandWindow.is_canceled(); bool left = false, right = false; if (active && MenuData.MultipleArcs && ModeSwitchTimer <= 0) { if (Global.Input.triggered(Inputs.Left) || Global.Input.gesture_triggered(TouchGestures.SwipeRight)) { left = true; } else if (Global.Input.triggered(Inputs.Right) || Global.Input.gesture_triggered(TouchGestures.SwipeLeft)) { right = true; } } if (cancel) { OnCanceled(new EventArgs()); } else if (changeDifficulty) { SwitchDifficulty(true); } else if (left || right) { Global.game_system.play_se(System_Sounds.Status_Page_Change); MenuData.ChangeArc(right); MenuData.Index = MenuData.IndexRedirect[0]; CreateCommandWindow(); Refresh(); ModeSwitchTimer = Constants.WorldMap.WORLDMAP_MODE_SWITCH_DELAY; } else if (CommandWindow.is_selected()) { OnChapterSelected(new EventArgs()); } } // Chapter selected else { cancel |= ChapterCommandWindow.is_canceled(); if (cancel) { Global.game_system.play_se(System_Sounds.Cancel); CloseChapterCommands(); } else if (changeDifficulty) { SwitchDifficulty(true); } else if (ChapterCommandWindow.is_selected()) { OnChapterCommandSelected(new EventArgs()); } } }