From 621e18f27337ad00d05efd83394e2d66fbee2c75 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Nov 2023 15:11:05 -0500 Subject: [PATCH 1/6] assets update --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 4ed2b3084..911327220 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 4ed2b3084d54899e10d10a97eaafe210158768be +Subproject commit 911327220fe2aeaa08e111992a0fb9410476205f From 25a66ddbfe04111126b4adaddc7c040513799929 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Nov 2023 15:23:24 -0500 Subject: [PATCH 2/6] open recent on welcome screen --- .../debug/charting/handlers/ChartEditorDialogHandler.hx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx index 06da6ee12..c9229009c 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx @@ -101,7 +101,13 @@ class ChartEditorDialogHandler if (chartPath == null) continue; var linkRecentChart:Link = new Link(); - linkRecentChart.text = chartPath; + // regex to only use the filename, not the full path + // "dadbattle.fnc" insted of "c:/user/docs/funkin/dadbattle.fnc" + // hovering tooltip shows full path + var fileNamePattern:EReg = new EReg("([^/\\\\]+)$", ""); + var fileName:String = fileNamePattern.match(chartPath) ? fileNamePattern.matched(1) : chartPath; + linkRecentChart.text = fileName; + linkRecentChart.tooltip = chartPath; linkRecentChart.onClick = function(_event) { dialog.hideDialog(DialogButton.CANCEL); state.stopWelcomeMusic(); From 63f65149f7b8a0c9f4465d46e74e644041919b4d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Nov 2023 16:09:13 -0500 Subject: [PATCH 3/6] skip transition into chart editor --- assets | 2 +- source/funkin/ui/debug/DebugMenuSubState.hx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets b/assets index 911327220..04ff6aa6a 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 911327220fe2aeaa08e111992a0fb9410476205f +Subproject commit 04ff6aa6ab22f9696932973f1644e5327dc44baa diff --git a/source/funkin/ui/debug/DebugMenuSubState.hx b/source/funkin/ui/debug/DebugMenuSubState.hx index e1f340770..404bf6f67 100644 --- a/source/funkin/ui/debug/DebugMenuSubState.hx +++ b/source/funkin/ui/debug/DebugMenuSubState.hx @@ -8,6 +8,7 @@ import funkin.ui.TextMenuList; import funkin.ui.debug.charting.ChartEditorState; import funkin.ui.MusicBeatSubState; import funkin.util.logging.CrashHandler; +import flixel.addons.transition.FlxTransitionableState; class DebugMenuSubState extends MusicBeatSubState { @@ -84,6 +85,8 @@ class DebugMenuSubState extends MusicBeatSubState function openChartEditor() { + FlxTransitionableState.skipNextTransIn = true; + FlxG.switchState(new ChartEditorState()); } From cdfb3fb1727ac070d6469891bb2ef4603ec2fb8c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Nov 2023 18:45:31 -0500 Subject: [PATCH 4/6] dialog cursor fix --- source/funkin/ui/debug/charting/ChartEditorState.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 4772fab7c..80bceab32 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -2951,9 +2951,10 @@ class ChartEditorState extends HaxeUIState if (FlxG.mouse.justReleased) FlxG.sound.play(Paths.sound("chartingSounds/ClickUp")); // Note: If a menu is open in HaxeUI, don't handle cursor behavior. - var shouldHandleCursor:Bool = !(isHaxeUIFocused || playbarHeadDragging) + var shouldHandleCursor:Bool = !(isHaxeUIFocused || playbarHeadDragging || isHaxeUIDialogOpen) || (selectionBoxStartPos != null) || (dragTargetNote != null || dragTargetEvent != null); + var eventColumn:Int = (STRUMLINE_SIZE * 2 + 1) - 1; // trace('shouldHandleCursor: $shouldHandleCursor'); From 21d70467746051085db806a084b8856757569dbc Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 21 Nov 2023 19:33:29 -0500 Subject: [PATCH 5/6] dropdown assets update --- assets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets b/assets index 04ff6aa6a..f715fd22c 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 04ff6aa6ab22f9696932973f1644e5327dc44baa +Subproject commit f715fd22cd51e71b017fae796cfe564b76dec20e From d66141c15afecaa85703973297dbaae4f1e65e14 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Wed, 22 Nov 2023 19:53:56 -0500 Subject: [PATCH 6/6] playhead dragging --- .../ui/debug/charting/ChartEditorState.hx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 4772fab7c..84883b591 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -1956,16 +1956,21 @@ class ChartEditorState extends HaxeUIState } } + playbarHead.onDrag = function(_:DragEvent) { + if (playbarHeadDragging) + { + var value:Null = playbarHead?.value; + + // Set the song position to where the playhead was moved to. + scrollPositionInPixels = songLengthInPixels * ((value ?? 0.0) / 100); + // Update the conductor and audio tracks to match. + moveSongToScrollPosition(); + } + } + playbarHead.onDragEnd = function(_:DragEvent) { playbarHeadDragging = false; - var value:Null = playbarHead?.value; - - // Set the song position to where the playhead was moved to. - scrollPositionInPixels = songLengthInPixels * ((value ?? 0.0) / 100); - // Update the conductor and audio tracks to match. - moveSongToScrollPosition(); - // If we were dragging the playhead while the song was playing, resume playing. if (playbarHeadDraggingWasPlaying) {