From accc197407c86a6fe9aaf1c557c93148674879ff Mon Sep 17 00:00:00 2001 From: Frakits Date: Sun, 26 Jan 2025 10:57:48 +0200 Subject: [PATCH] properly working --- source/funkin/editors/charter/Charter.hx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 717aa224..494a7e73 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -758,6 +758,7 @@ class Charter extends UIState { selectionBox.y = Math.min(mousePos.y, dragStartPos.y); selectionBox.bWidth = Std.int(Math.abs(mousePos.x - dragStartPos.x)); selectionBox.bHeight = Std.int(Math.abs(mousePos.y - dragStartPos.y)); + if (FlxG.mouse.justReleased) isSelecting = false; } else { if (FlxG.keys.pressed.SHIFT) { for (group in [notesGroup, eventsGroup]) { @@ -854,7 +855,7 @@ class Charter extends UIState { currentCursor = ARROW; } case NONE: - if (FlxG.mouse.justPressed) + if (FlxG.mouse.justPressed) FlxG.mouse.getWorldPosition(charterCamera, dragStartPos); else if (FlxG.mouse.justPressedRight) { closeCurrentContextMenu(); @@ -863,8 +864,8 @@ class Charter extends UIState { if (gridBackdropDummy.hovered) { // AUTO DETECT - if (FlxG.mouse.justPressed && (Math.abs(mousePos.x - dragStartPos.x) > 20 || Math.abs(mousePos.y - dragStartPos.y) > 20)) { - isSelecting = true; + if (FlxG.mouse.justPressed) isSelecting = true; + if (isSelecting && (Math.abs(mousePos.x - dragStartPos.x) > 20 || Math.abs(mousePos.y - dragStartPos.y) > 20)) { gridActionType = BOX_SELECTION; } @@ -1240,7 +1241,7 @@ class Charter extends UIState { __camZoom = Math.pow(2, zoom); } } else { - if (!FlxG.sound.music.playing) { + if (!FlxG.sound.music.playing && FlxG.mouse.wheel != 0) { Conductor.songPosition -= (__crochet * FlxG.mouse.wheel) - Conductor.songOffset; } }