From c3fa793d971b04ef5e8fa22883a2af261bba79ff Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sun, 10 Dec 2023 04:10:57 -0500 Subject: [PATCH] adds !isCursorOverHaxeUI around --- .../ui/debug/charting/ChartEditorState.hx | 45 ++++++++++--------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index dc5ef67dc..fe538966d 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -3409,7 +3409,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState { gridPlayheadScrollAreaPressed = true; } - else if (notePreview != null && FlxG.mouse.overlaps(notePreview)) + else if (notePreview != null && !isCursorOverHaxeUI && FlxG.mouse.overlaps(notePreview)) { // Clicked note preview notePreviewScrollAreaStartPos = new FlxPoint(FlxG.mouse.screenX, FlxG.mouse.screenY); @@ -3861,7 +3861,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState if (FlxG.mouse.justPressed) { // Just clicked to place a note. - if (overlapsGrid && !overlapsSelectionBorder) + if (!isCursorOverHaxeUI && overlapsGrid && !overlapsSelectionBorder) { // We clicked on the grid without moving the mouse. @@ -4006,7 +4006,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState var isOrWillSelect = overlapsSelection || dragTargetNote != null || dragTargetEvent != null; // Handle grid cursor. - if (overlapsGrid && !isOrWillSelect && !overlapsSelectionBorder && !gridPlayheadScrollAreaPressed) + if (!isCursorOverHaxeUI && overlapsGrid && !isOrWillSelect && !overlapsSelectionBorder && !gridPlayheadScrollAreaPressed) { // Indicate that we can place a note here. @@ -4077,25 +4077,28 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState } else { - if (notePreview != null && FlxG.mouse.overlaps(notePreview)) + if (!isCursorOverHaxeUI) { - targetCursorMode = Pointer; - } - else if (gridPlayheadScrollArea != null && FlxG.mouse.overlaps(gridPlayheadScrollArea)) - { - targetCursorMode = Pointer; - } - else if (overlapsSelection) - { - targetCursorMode = Pointer; - } - else if (overlapsSelectionBorder) - { - targetCursorMode = Crosshair; - } - else if (overlapsGrid) - { - targetCursorMode = Cell; + if (notePreview != null && FlxG.mouse.overlaps(notePreview)) + { + targetCursorMode = Pointer; + } + else if (gridPlayheadScrollArea != null && FlxG.mouse.overlaps(gridPlayheadScrollArea)) + { + targetCursorMode = Pointer; + } + else if (overlapsSelection) + { + targetCursorMode = Pointer; + } + else if (overlapsSelectionBorder) + { + targetCursorMode = Crosshair; + } + else if (overlapsGrid) + { + targetCursorMode = Cell; + } } } }