mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
open recent on welcome screen
This commit is contained in:
parent
64b028baee
commit
25a66ddbfe
1 changed files with 7 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue