diff --git a/assets b/assets index 4cbffd074..4a0004864 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 4cbffd074bb6d1d5fa13492d19e0736869338ac3 +Subproject commit 4a0004864b620a83f7468dfcc10e0a2036bba872 diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 92279ef27..2cd79fdea 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -2126,6 +2126,16 @@ class ChartEditorState extends HaxeUIState addUIClickListener('menubarItemAbout', _ -> this.openAboutDialog()); addUIClickListener('menubarItemWelcomeDialog', _ -> this.openWelcomeDialog(true)); + #if sys + addUIClickListener('menubarItemGoToBackupsFolder', _ -> this.openBackupsFolder()); + #else + // Disable the menu item if we're not on a desktop platform. + var menubarItemGoToBackupsFolder = findComponent('menubarItemGoToBackupsFolder', MenuItem); + if (menubarItemGoToBackupsFolder != null) menubarItemGoToBackupsFolder.disabled = true; + + menubarItemGoToBackupsFolder.disabled = true; + #end + addUIClickListener('menubarItemUserGuide', _ -> this.openUserGuideDialog()); addUIChangeListener('menubarItemDownscroll', event -> isViewDownscroll = event.value); @@ -2259,10 +2269,27 @@ class ChartEditorState extends HaxeUIState if (needsAutoSave) { this.exportAllSongData(true, null); + this.infoWithActions('Auto-Save', 'Chart auto-saved to your backups folder.', [ + { + "text": "Take Me There", + action: openBackupsFolder, + } + ], true); } #end } + /** + * Open the backups folder in the file explorer. + * Don't call this on HTML5. + */ + function openBackupsFolder():Void + { + // TODO: Is there a way to open a folder and highlight a file in it? + var absoluteBackupsPath:String = Path.join([Sys.getCwd(), ChartEditorImportExportHandler.BACKUPS_PATH]); + WindowUtil.openFolder(absoluteBackupsPath); + } + /** * Called when the window was closed, to save a backup of the chart. * @param exitCode The exit code of the window. We use `-1` when calling the function due to a game crash. diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx index 86717132b..2a8560721 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorDialogHandler.hx @@ -288,9 +288,7 @@ class ChartEditorDialogHandler var buttonGoToFolder:Null