diff --git a/assets b/assets index d40c3ee99a..c062e03cfd 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit d40c3ee99a423c9c366bb7bc042f657ee18d2811 +Subproject commit c062e03cfddd88daf674e6dfae9658228cfd32b9 diff --git a/source/funkin/ui/debug/char/components/dialogs/PlayableCharacterSettingsDialog.hx b/source/funkin/ui/debug/char/components/dialogs/PlayableCharacterSettingsDialog.hx new file mode 100644 index 0000000000..4387646ff5 --- /dev/null +++ b/source/funkin/ui/debug/char/components/dialogs/PlayableCharacterSettingsDialog.hx @@ -0,0 +1,10 @@ +package funkin.ui.debug.char.components.dialogs; + +@:build(haxe.ui.macros.ComponentMacros.build("assets/exclude/data/ui/char-creator/dialogs/playable-character-settings-dialog.xml")) +class PlayableCharacterSettingsDialog extends DefaultPageDialog +{ + override public function new(daPage:CharCreatorDefaultPage) + { + super(daPage); + } +} diff --git a/source/funkin/ui/debug/char/pages/CharCreatorSelectPage.hx b/source/funkin/ui/debug/char/pages/CharCreatorSelectPage.hx index f843476321..355d616e2e 100644 --- a/source/funkin/ui/debug/char/pages/CharCreatorSelectPage.hx +++ b/source/funkin/ui/debug/char/pages/CharCreatorSelectPage.hx @@ -2,12 +2,14 @@ package funkin.ui.debug.char.pages; import haxe.ui.containers.menus.Menu; import haxe.ui.containers.menus.MenuItem; +import haxe.ui.containers.menus.MenuCheckBox; import funkin.audio.FunkinSound; import funkin.data.freeplay.player.PlayerData; import funkin.data.freeplay.player.PlayerRegistry; import funkin.graphics.adobeanimate.FlxAtlasSprite; import funkin.graphics.FunkinSprite; import funkin.ui.debug.char.pages.subpages.CharSelectIndexSubPage; +import funkin.ui.debug.char.components.dialogs.*; import funkin.util.FileUtil; import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup; import flixel.group.FlxSpriteGroup; @@ -39,6 +41,8 @@ class CharCreatorSelectPage extends CharCreatorDefaultPage var selectedIndexData:Int = 0; var pixelIconFiles:Array = []; + var dialogMap:Map; + var subPages:Map; var handleInput:Bool = true; @@ -67,6 +71,9 @@ class CharCreatorSelectPage extends CharCreatorDefaultPage nametag = new FlxSprite(); add(nametag); + dialogMap = new Map(); + dialogMap.set(SettingsDialog, new PlayableCharacterSettingsDialog(this)); + subPages = new Map(); subPages.set(IndexSubPage, new CharSelectIndexSubPage(this)); @@ -89,6 +96,10 @@ class CharCreatorSelectPage extends CharCreatorDefaultPage pixelStuff.addComponent(openFile); pixelStuff.addComponent(openPos); + var settingsDialog = new MenuCheckBox(); + settingsDialog.text = "Playable Character Settings"; + menu.addComponent(settingsDialog); + // callbacks openPos.onClick = function(_) { cast(subPages[IndexSubPage], CharSelectIndexSubPage).open(); @@ -111,6 +122,10 @@ class CharCreatorSelectPage extends CharCreatorDefaultPage cast(subPages[IndexSubPage], CharSelectIndexSubPage).resetIconTexture(); }); } + + settingsDialog.onClick = function(_) { + dialogMap[SettingsDialog].hidden = !settingsDialog.selected; + } } function initBackground():Void @@ -238,3 +253,8 @@ enum CharCreatorSelectSubPage { IndexSubPage; } + +enum PlayCharDialogType +{ + SettingsDialog; +}