From 0d4152a59256cbf186e5c87d355287b44ea013b1 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Sun, 17 Sep 2023 00:06:34 -0700 Subject: [PATCH] hi guyts --- source/funkin/editors/charter/Charter.hx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index e0bfeac4..4e4d9d98 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -565,6 +565,7 @@ class Charter extends UIState { n.cursor = HAND; }, function (e:CharterEvent) { e.y = e.step * 40 + (mousePos.y - dragStartPos.y) - 17; + e.y = FlxMath.bound(e.y, -17, (__endStep*40)-17); e.cursor = HAND; }); currentCursor = HAND; @@ -627,10 +628,9 @@ class Charter extends UIState { var mouseOnGrid = id >= 0 && id < 4 * gridBackdrops.strumlinesAmount && mousePos.y >= 0; if (FlxG.mouse.justReleased) { - if (selection.length > 1) { for (n in selection) n.selected = false; - selection = []; // clear selection - } else { + selection = []; + if (mouseOnGrid && mousePos.y > 0 && mousePos.y < (__endStep)*40) { var note = new CharterNote(); note.updatePos(FlxMath.bound(FlxG.keys.pressed.SHIFT ? ((mousePos.y-20) / 40) : Math.floor(mousePos.y / 40), 0, __endStep-1), id % 4, 0, 0, strumLines.members[Std.int(id/4)]); @@ -638,7 +638,6 @@ class Charter extends UIState { selection = [note]; undos.addToUndo(CCreateSelection([note])); } - } } } else if (gridBackdropDummy.hoveredByChild) { if (FlxG.mouse.pressed && (Math.abs(mousePos.x - dragStartPos.x) > 5 || Math.abs(mousePos.y - dragStartPos.y) > 5)) {