diff --git a/assets/images/editors/charter/strumline-drag.png b/assets/images/editors/charter/strumline-drag.png index 9fb8fa5e..e886483f 100644 Binary files a/assets/images/editors/charter/strumline-drag.png and b/assets/images/editors/charter/strumline-drag.png differ diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index e2dd272b..7451bbe2 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -635,16 +635,16 @@ class Charter extends UIState { break; } - dragStartPos.set(Std.int(dragStartPos.x / 40) * 40, quantStep(dragStartPos.y/40)*40); //credits to burgerballs - var verticalChange:Float = - FlxG.keys.pressed.SHIFT ? ((mousePos.y - hoverOffset.y) - dragStartPos.y) / 40 - : CoolUtil.floorInt(quantStep((mousePos.y - dragStartPos.y) / 40)); + dragStartPos.set(Std.int(dragStartPos.x / 40) * 40, dragStartPos.y); //credits to burgerballs + var verticalChange:Float = ((mousePos.y - hoverOffset.y) - dragStartPos.y) / 40; var horizontalChange:Int = CoolUtil.floorInt((mousePos.x - dragStartPos.x) / 40); - var changePoint:FlxPoint = FlxPoint.get(verticalChange, horizontalChange); var undoDrags:Array = []; for (s in selection) { + trace(s.step, verticalChange, s.step + verticalChange, quantStep(s.step+verticalChange)); + trace(verticalChange - ((s.step + verticalChange) - quantStep(s.step+verticalChange))); if (s.draggable) { + var changePoint:FlxPoint = FlxPoint.get(verticalChange - ((s.step + verticalChange) - quantStep(s.step+verticalChange)), horizontalChange); var boundedChange:FlxPoint = changePoint.clone(); // Some maths, so cool bro -lunar (i dont know why i quopte my self here) @@ -657,16 +657,16 @@ class Charter extends UIState { if (note.fullID + changePoint.y > (strumLines.members.length*4)-1) boundedChange.y -= (note.fullID + changePoint.y) - ((strumLines.members.length*4)-1); } - s.handleDrag(changePoint); + s.handleDrag(boundedChange); undoDrags.push({selectable:s, change: boundedChange}); + changePoint.put(); } if (s is CharterNote) cast(s, CharterNote).snappedToStrumline = true; if (s is UISprite) cast(s, UISprite).cursor = BUTTON; } - if (!(changePoint.x == 0 && changePoint.y == 0)) undos.addToUndo(CSelectionDrag(undoDrags)); + if (!(verticalChange == 0 && horizontalChange == 0)) undos.addToUndo(CSelectionDrag(undoDrags)); - changePoint.put(); hoverOffset.put(); gridActionType = NONE; diff --git a/source/funkin/editors/charter/CharterStrumlineButton.hx b/source/funkin/editors/charter/CharterStrumlineButton.hx index f43db989..2a6fd184 100644 --- a/source/funkin/editors/charter/CharterStrumlineButton.hx +++ b/source/funkin/editors/charter/CharterStrumlineButton.hx @@ -23,7 +23,7 @@ class CharterStrumlineButton extends UISprite { button.animation.play("0", true); button.scale.set(0.85,0.85); button.updateHitbox(); - button.antialiasing = false; + button.antialiasing = true; button.cursor = BUTTON; members.push(button); @@ -93,7 +93,7 @@ class CharterStrumlineButton extends UISprite { .then(FlxTween.tween(this, {buttonYOffset: 0}, .1 + FlxG.random.float(.1, .3), {ease: FlxEase.circIn})); if (scaleTween != null) scaleTween.cancel(); buttonScaleOffset.set(0,0); - scaleTween = FlxTween.tween(buttonScaleOffset, {x: .015, y: .02}, .12, {ease: FlxEase.circOut}) + scaleTween = FlxTween.tween(buttonScaleOffset, {x: .015 * (extra ? 3 : 1), y: .02 * (extra ? 3 : 1)}, .12, {ease: FlxEase.circOut}) .then(FlxTween.tween(buttonScaleOffset, {x: 0, y: 0}, .1 + FlxG.random.float(.1, .3), {ease: FlxEase.circIn})); if (!extra) return;