mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 11:15:24 -05:00
mac keyboard shortcuts on stage editor
This commit is contained in:
parent
8cd7f2a5b1
commit
623985a2cc
2 changed files with 5 additions and 4 deletions
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue