mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-07-17 17:50:38 +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;
|
if (chartPath == null) continue;
|
||||||
|
|
||||||
var linkRecentChart:Link = new Link();
|
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) {
|
linkRecentChart.onClick = function(_event) {
|
||||||
dialog.hideDialog(DialogButton.CANCEL);
|
dialog.hideDialog(DialogButton.CANCEL);
|
||||||
state.stopWelcomeMusic();
|
state.stopWelcomeMusic();
|
||||||
|
|
Loading…
Reference in a new issue