mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-01 01:36:47 +00:00
Merge branch 'rewrite/master' into rewrite/feature/chart-editor-variation-button
This commit is contained in:
commit
e33c825a1f
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit 7e698e3dd51443f0bb8aa4105596f8e87eca4a9b
|
||||
Subproject commit 7bc9407e0e8141a643605ff4514ba63169cc41e2
|
2
hmm.json
2
hmm.json
|
@ -139,7 +139,7 @@
|
|||
"name": "openfl",
|
||||
"type": "git",
|
||||
"dir": null,
|
||||
"ref": "d33d489a137ff8fdece4994cf1302f0b6334ed08",
|
||||
"ref": "de9395d2f367a80f93f082e1b639b9cde2258bf1",
|
||||
"url": "https://github.com/EliteMasterEric/openfl"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -89,6 +89,7 @@ class ChartEditorDialogHandler
|
|||
linkCreateBasic.onClick = function(_event) {
|
||||
// Hide the welcome dialog
|
||||
dialog.hideDialog(DialogButton.CANCEL);
|
||||
state.stopWelcomeMusic();
|
||||
|
||||
//
|
||||
// Create Song Wizard
|
||||
|
@ -101,6 +102,7 @@ class ChartEditorDialogHandler
|
|||
linkImportChartLegacy.onClick = function(_event) {
|
||||
// Hide the welcome dialog
|
||||
dialog.hideDialog(DialogButton.CANCEL);
|
||||
state.stopWelcomeMusic();
|
||||
|
||||
// Open the "Import Chart" dialog
|
||||
openImportChartWizard(state, 'legacy', false);
|
||||
|
@ -111,6 +113,7 @@ class ChartEditorDialogHandler
|
|||
buttonBrowse.onClick = function(_event) {
|
||||
// Hide the welcome dialog
|
||||
dialog.hideDialog(DialogButton.CANCEL);
|
||||
state.stopWelcomeMusic();
|
||||
|
||||
// Open the "Open Chart" dialog
|
||||
openBrowseWizard(state, false);
|
||||
|
@ -139,6 +142,7 @@ class ChartEditorDialogHandler
|
|||
linkTemplateSong.text = songName;
|
||||
linkTemplateSong.onClick = function(_event) {
|
||||
dialog.hideDialog(DialogButton.CANCEL);
|
||||
state.stopWelcomeMusic();
|
||||
|
||||
// Load song from template
|
||||
ChartEditorImportExportHandler.loadSongAsTemplate(state, targetSongId);
|
||||
|
@ -147,6 +151,7 @@ class ChartEditorDialogHandler
|
|||
splashTemplateContainer.addComponent(linkTemplateSong);
|
||||
}
|
||||
|
||||
state.fadeInWelcomeMusic();
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
|
|
@ -756,6 +756,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.
|
||||
* `null` until an instrumental track is loaded.
|
||||
|
@ -1225,6 +1230,9 @@ class ChartEditorState extends HaxeUIState
|
|||
// Get rid of any music from the previous state.
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
// Play the welcome music.
|
||||
setupWelcomeMusic();
|
||||
|
||||
buildDefaultSongData();
|
||||
|
||||
buildBackground();
|
||||
|
@ -1249,6 +1257,26 @@ class ChartEditorState extends HaxeUIState
|
|||
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
|
||||
{
|
||||
selectedVariation = Constants.DEFAULT_VARIATION;
|
||||
|
|
Loading…
Reference in a new issue