From 045520731b727efd458de11dd29cae6c38871385 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Sun, 19 Nov 2023 13:24:10 -0700 Subject: [PATCH] add snapping to note drags --- source/funkin/editors/charter/Charter.hx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index a89195e8..9a41c8f1 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -683,7 +683,7 @@ class Charter extends UIState { dragStartPos.set(Std.int(dragStartPos.x / 40) * 40, qauntStep(dragStartPos.y/40)*40); //credits to burgerballs var verticalChange:Float = FlxG.keys.pressed.SHIFT ? ((mousePos.y - hoverOffset.y) - dragStartPos.y) / 40 - : CoolUtil.floorInt((mousePos.y - dragStartPos.y) / 40); + : CoolUtil.floorInt(qauntStep((mousePos.y - dragStartPos.y) / 40)); var horizontalChange:Int = CoolUtil.floorInt((mousePos.x - dragStartPos.x) / 40); var changePoint:FlxPoint = FlxPoint.get(verticalChange, horizontalChange); var undoDrags:Array = []; @@ -793,7 +793,6 @@ class Charter extends UIState { var stepMulti:Float = 1/(qaunt/16); return Math.floor(step/stepMulti) * stepMulti; } - public function getHoveredEvent(y:Float) { var eventHovered:CharterEvent = null;