diff --git a/source/funkin/ui/debug/stageeditor/StageEditorState.hx b/source/funkin/ui/debug/stageeditor/StageEditorState.hx index e6d2e1f8a..54f574f2d 100644 --- a/source/funkin/ui/debug/stageeditor/StageEditorState.hx +++ b/source/funkin/ui/debug/stageeditor/StageEditorState.hx @@ -292,7 +292,7 @@ class StageEditorState extends UIState { WindowManager.instance.reset(); instance = this; - FlxG.sound.music.stop(); + FlxG.sound.music?.stop(); WindowUtil.setWindowTitle("Friday Night Funkin\' Stage Editor"); AssetDataHandler.init(this); @@ -503,7 +503,7 @@ class StageEditorState extends UIState return super.beatHit(); } - override public function update(elapsed:Float) + override public function update(elapsed:Float):Void { updateBGSize(); conductorInUse.update(); @@ -563,7 +563,8 @@ class StageEditorState extends UIState // key shortcuts and inputs if (allowInput) { - if (FlxG.keys.pressed.CONTROL) + // "WINDOWS" key code is the same keycode as COMMAND on mac + if (FlxG.keys.pressed.CONTROL || FlxG.keys.pressed.WINDOWS) { if (FlxG.keys.justPressed.Z) onMenuItemClick("undo"); if (FlxG.keys.justPressed.Y) onMenuItemClick("redo"); diff --git a/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx b/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx index 947bb5cf3..2fc38aab3 100644 --- a/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx +++ b/source/funkin/ui/debug/stageeditor/handlers/UndoRedoHandler.hx @@ -6,7 +6,7 @@ import funkin.ui.debug.stageeditor.StageEditorState.StageEditorDialogType; class UndoRedoHandler { - public static function performLastAction(state:StageEditorState, redo:Bool = false) + public static function performLastAction(state:StageEditorState, redo:Bool = false):Void { if (state == null || (state.undoArray.length <= 0 && !redo) || (state.redoArray.length <= 0 && redo)) return; var actionToDo = redo ? state.redoArray.pop() : state.undoArray.pop();