mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-19 06:24:56 +00:00
Add chart editor theme
This commit is contained in:
parent
ed6bc553ed
commit
b6752531bf
2
assets
2
assets
|
@ -1 +1 @@
|
|||
Subproject commit a62e7e50d59c14d256c75da651b79dea77e1620e
|
||||
Subproject commit e0e56cb3cdb1b4394c744d5c1502cdb2629fa9b6
|
|
@ -83,6 +83,7 @@ class ChartEditorDialogHandler
|
|||
linkCreateBasic.onClick = function(_event) {
|
||||
// Hide the welcome dialog
|
||||
dialog.hideDialog(DialogButton.CANCEL);
|
||||
state.stopWelcomeMusic();
|
||||
|
||||
//
|
||||
// Create Song Wizard
|
||||
|
@ -95,6 +96,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);
|
||||
|
@ -105,6 +107,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);
|
||||
|
@ -133,6 +136,7 @@ class ChartEditorDialogHandler
|
|||
linkTemplateSong.text = songName;
|
||||
linkTemplateSong.onClick = function(_event) {
|
||||
dialog.hideDialog(DialogButton.CANCEL);
|
||||
state.stopWelcomeMusic();
|
||||
|
||||
// Load song from template
|
||||
state.loadSongAsTemplate(targetSongId);
|
||||
|
@ -141,6 +145,7 @@ class ChartEditorDialogHandler
|
|||
splashTemplateContainer.addComponent(linkTemplateSong);
|
||||
}
|
||||
|
||||
state.fadeInWelcomeMusic();
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
|
|
@ -751,6 +751,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.
|
||||
|
@ -1249,6 +1254,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();
|
||||
|
@ -1273,6 +1281,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