void Shortcuts() { if (MSChartEditorInput.GetInputDown(MSChartEditorInputActions.ToggleMetronome)) { services.ToggleMetronome(); services.notificationBar.PushNotification("METRONOME TOGGLED " + Services.BoolToStrOnOff(GameSettings.metronomeActive), 2, true); } if (MSChartEditorInput.GetInputDown(MSChartEditorInputActions.FileSave)) { editor._Save(); } else if (MSChartEditorInput.GetInputDown(MSChartEditorInputActions.FileSaveAs)) { editor.SaveAs(); } else if (MSChartEditorInput.GetInputDown(MSChartEditorInputActions.FileLoad)) { editor.Load(); } else if (MSChartEditorInput.GetInputDown(MSChartEditorInputActions.FileNew)) { editor.New(); } }
void Shortcuts() { if (ShortcutInput.GetInputDown(Shortcut.PlayPause)) { if (applicationMode == ApplicationMode.Editor && services.CanPlay()) { editor.Play(); } else if (applicationMode == ApplicationMode.Playing) { editor.Stop(); } } else if (ShortcutInput.GetInputDown(Shortcut.StepIncrease)) { GameSettings.snappingStep.Increment(); } else if (ShortcutInput.GetInputDown(Shortcut.StepDecrease)) { GameSettings.snappingStep.Decrement(); } else if (ShortcutInput.GetInputDown(Shortcut.Delete) && editor.currentSelectedObjects.Count > 0) { editor.Delete(); } else if (ShortcutInput.GetInputDown(Shortcut.ToggleMetronome)) { services.ToggleMetronome(); services.notificationBar.PushNotification("METRONOME TOGGLED " + Services.BoolToStrOnOff(GameSettings.metronomeActive), 2, true); } if (!modifierInputActive) { if (editor.inputManager.mainGamepad.GetButtonPressed(GamepadInput.Button.Start)) { if (applicationMode != ApplicationMode.Playing) { editor.StartGameplay(); } else { editor.Stop(); } } } if (ShortcutInput.GetInputDown(Shortcut.FileSave)) { editor._Save(); } else if (ShortcutInput.GetInputDown(Shortcut.FileSaveAs)) { editor.SaveAs(); } else if (ShortcutInput.GetInputDown(Shortcut.FileLoad)) { editor.Load(); } else if (ShortcutInput.GetInputDown(Shortcut.FileNew)) { editor.New(); } else if (ShortcutInput.GetInputDown(Shortcut.SelectAll)) { services.toolpanelController.SetCursor(); HighlightAll(); } else if (ShortcutInput.GetInputDown(Shortcut.SelectAllSection)) { services.toolpanelController.SetCursor(); HighlightCurrentSection(); } if (!Input.GetMouseButton(0) && !Input.GetMouseButton(1)) { bool success = false; if (ShortcutInput.GetInputDown(Shortcut.ActionHistoryUndo)) { if (!editor.commandStack.isAtStart && editor.services.CanUndo()) { editor.UndoWrapper(); success = true; } } else if (ShortcutInput.GetInputDown(Shortcut.ActionHistoryRedo)) { if (!editor.commandStack.isAtEnd && editor.services.CanRedo()) { editor.RedoWrapper(); success = true; } } if (success) { EventSystem.current.SetSelectedGameObject(null); groupSelect.reset(); TimelineHandler.externalUpdate = true; } } if (editor.currentSelectedObjects.Count > 0) { if (ShortcutInput.GetInputDown(Shortcut.ClipboardCut)) { editor.Cut(); } else if (ShortcutInput.GetInputDown(Shortcut.ClipboardCopy)) { editor.Copy(); } } }