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()); } diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index b0e35412b..983840b75 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -1959,16 +1959,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) { @@ -3018,9 +3023,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'); diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx index 1b7dd2ca8..23895be68 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx @@ -102,7 +102,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();