From 1fa00fab9b2ee435ff107adb658c64e8310a28d4 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 2 Jun 2021 21:12:23 -0400 Subject: [PATCH] lil keyboard control shit --- source/ui/stageBuildShit/StageBuilderState.hx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/source/ui/stageBuildShit/StageBuilderState.hx b/source/ui/stageBuildShit/StageBuilderState.hx index 587bbb4f3..8eaa411c8 100644 --- a/source/ui/stageBuildShit/StageBuilderState.hx +++ b/source/ui/stageBuildShit/StageBuilderState.hx @@ -176,28 +176,31 @@ class StageBuilderState extends MusicBeatState // FlxG.stage.window.height += Std.int(20); } + if (FlxG.keys.justPressed.RIGHT) + moveSprPos([1, 0, true]); + if (FlxG.keys.justPressed.LEFT) + moveSprPos([-1, 0, true]); if (FlxG.keys.justPressed.UP) + moveSprPos([0, -1, true]); + if (FlxG.keys.justPressed.DOWN) + moveSprPos([0, 1, true]); + + if (FlxG.keys.justPressed.LBRACKET) { if (curSelectedSpr != null) - { moveLayer(1); - } } - if (FlxG.keys.justPressed.DOWN) + if (FlxG.keys.justPressed.RBRACKET) { if (curSelectedSpr != null) - { moveLayer(-1); - } } if (FlxG.keys.justPressed.DELETE) { if (curSelectedSpr != null) - { sprGrp.remove(curSelectedSpr, true); - } } CoolUtil.mouseCamDrag(); @@ -231,7 +234,7 @@ class StageBuilderState extends MusicBeatState if (FlxG.keys.justPressed.Z && actionQueue.length > 0) { - trace('UNDO - QUEUE LENGTH: ' + actionQueue.length); + // trace('UNDO - QUEUE LENGTH: ' + actionQueue.length); isUndoRedo = true; actionQueue.pop()(posQueue.pop()); } @@ -295,11 +298,8 @@ class StageBuilderState extends MusicBeatState var yDiff:Float = dumbArray[1]; var forceMove:Bool = dumbArray[2]; - // if (forceMove == null) - // forceMove = false; - - trace(xDiff); - trace(yDiff); + // trace(xDiff); + // trace(yDiff); if (forceMove) {