mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-02-17 04:11:23 -05:00
Merge branch 'rewrite/master' into rewrite/feature/chart-editor-wasd
This commit is contained in:
commit
7c653a9e9b
4 changed files with 36 additions and 3 deletions
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit 62856964577dab4994737d1fba32399c43add677
|
Subproject commit 66545149104a0ca37718b189f56fcedd6abcbabc
|
4
hmm.json
4
hmm.json
|
@ -139,7 +139,7 @@
|
||||||
"name": "openfl",
|
"name": "openfl",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"dir": null,
|
"dir": null,
|
||||||
"ref": "d33d489a137ff8fdece4994cf1302f0b6334ed08",
|
"ref": "de9395d2f367a80f93f082e1b639b9cde2258bf1",
|
||||||
"url": "https://github.com/EliteMasterEric/openfl"
|
"url": "https://github.com/EliteMasterEric/openfl"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -160,4 +160,4 @@
|
||||||
"version": "0.11.0"
|
"version": "0.11.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ class ChartEditorDialogHandler
|
||||||
linkCreateBasic.onClick = function(_event) {
|
linkCreateBasic.onClick = function(_event) {
|
||||||
// Hide the welcome dialog
|
// Hide the welcome dialog
|
||||||
dialog.hideDialog(DialogButton.CANCEL);
|
dialog.hideDialog(DialogButton.CANCEL);
|
||||||
|
state.stopWelcomeMusic();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create Song Wizard
|
// Create Song Wizard
|
||||||
|
@ -95,6 +96,7 @@ class ChartEditorDialogHandler
|
||||||
linkImportChartLegacy.onClick = function(_event) {
|
linkImportChartLegacy.onClick = function(_event) {
|
||||||
// Hide the welcome dialog
|
// Hide the welcome dialog
|
||||||
dialog.hideDialog(DialogButton.CANCEL);
|
dialog.hideDialog(DialogButton.CANCEL);
|
||||||
|
state.stopWelcomeMusic();
|
||||||
|
|
||||||
// Open the "Import Chart" dialog
|
// Open the "Import Chart" dialog
|
||||||
openImportChartWizard(state, 'legacy', false);
|
openImportChartWizard(state, 'legacy', false);
|
||||||
|
@ -105,6 +107,7 @@ class ChartEditorDialogHandler
|
||||||
buttonBrowse.onClick = function(_event) {
|
buttonBrowse.onClick = function(_event) {
|
||||||
// Hide the welcome dialog
|
// Hide the welcome dialog
|
||||||
dialog.hideDialog(DialogButton.CANCEL);
|
dialog.hideDialog(DialogButton.CANCEL);
|
||||||
|
state.stopWelcomeMusic();
|
||||||
|
|
||||||
// Open the "Open Chart" dialog
|
// Open the "Open Chart" dialog
|
||||||
openBrowseWizard(state, false);
|
openBrowseWizard(state, false);
|
||||||
|
@ -133,6 +136,7 @@ class ChartEditorDialogHandler
|
||||||
linkTemplateSong.text = songName;
|
linkTemplateSong.text = songName;
|
||||||
linkTemplateSong.onClick = function(_event) {
|
linkTemplateSong.onClick = function(_event) {
|
||||||
dialog.hideDialog(DialogButton.CANCEL);
|
dialog.hideDialog(DialogButton.CANCEL);
|
||||||
|
state.stopWelcomeMusic();
|
||||||
|
|
||||||
// Load song from template
|
// Load song from template
|
||||||
state.loadSongAsTemplate(targetSongId);
|
state.loadSongAsTemplate(targetSongId);
|
||||||
|
@ -141,6 +145,7 @@ class ChartEditorDialogHandler
|
||||||
splashTemplateContainer.addComponent(linkTemplateSong);
|
splashTemplateContainer.addComponent(linkTemplateSong);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state.fadeInWelcomeMusic();
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -761,6 +761,11 @@ class ChartEditorState extends HaxeUIState
|
||||||
*/
|
*/
|
||||||
// ==============================
|
// ==============================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The chill audio track that plays when you open the Chart Editor.
|
||||||
|
*/
|
||||||
|
public var welcomeMusic:FlxSound = new FlxSound();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The audio track for the instrumental.
|
* The audio track for the instrumental.
|
||||||
* `null` until an instrumental track is loaded.
|
* `null` until an instrumental track is loaded.
|
||||||
|
@ -1259,6 +1264,9 @@ class ChartEditorState extends HaxeUIState
|
||||||
// Get rid of any music from the previous state.
|
// Get rid of any music from the previous state.
|
||||||
FlxG.sound.music.stop();
|
FlxG.sound.music.stop();
|
||||||
|
|
||||||
|
// Play the welcome music.
|
||||||
|
setupWelcomeMusic();
|
||||||
|
|
||||||
buildDefaultSongData();
|
buildDefaultSongData();
|
||||||
|
|
||||||
buildBackground();
|
buildBackground();
|
||||||
|
@ -1283,6 +1291,26 @@ class ChartEditorState extends HaxeUIState
|
||||||
ChartEditorDialogHandler.openWelcomeDialog(this, false);
|
ChartEditorDialogHandler.openWelcomeDialog(this, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setupWelcomeMusic()
|
||||||
|
{
|
||||||
|
this.welcomeMusic.loadEmbedded(Paths.music('chartEditorLoop/chartEditorLoop'));
|
||||||
|
this.welcomeMusic.looped = true;
|
||||||
|
// this.welcomeMusic.play();
|
||||||
|
// fadeInWelcomeMusic();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fadeInWelcomeMusic():Void
|
||||||
|
{
|
||||||
|
this.welcomeMusic.play();
|
||||||
|
this.welcomeMusic.fadeIn(4, 0, 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function stopWelcomeMusic():Void
|
||||||
|
{
|
||||||
|
// this.welcomeMusic.fadeOut(4, 0);
|
||||||
|
this.welcomeMusic.pause();
|
||||||
|
}
|
||||||
|
|
||||||
function buildDefaultSongData():Void
|
function buildDefaultSongData():Void
|
||||||
{
|
{
|
||||||
selectedVariation = Constants.DEFAULT_VARIATION;
|
selectedVariation = Constants.DEFAULT_VARIATION;
|
||||||
|
|
Loading…
Reference in a new issue