mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-30 18:53:35 +00:00
open recent on welcome screen
This commit is contained in:
parent
64b028baee
commit
25a66ddbfe
|
@ -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