From 7b24398cc47198cf6499da0d958f0a6c09c573ca Mon Sep 17 00:00:00 2001 From: lemz1 Date: Sun, 17 Nov 2024 01:11:11 +0100 Subject: [PATCH] import bgtext --- .../dialogs/FreeplayDJSettingsDialog.hx | 14 +++++++++++ .../char/pages/CharCreatorFreeplayPage.hx | 25 +++++-------------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/source/funkin/ui/debug/char/components/dialogs/FreeplayDJSettingsDialog.hx b/source/funkin/ui/debug/char/components/dialogs/FreeplayDJSettingsDialog.hx index 8e7e46c466..3b10e99e53 100644 --- a/source/funkin/ui/debug/char/components/dialogs/FreeplayDJSettingsDialog.hx +++ b/source/funkin/ui/debug/char/components/dialogs/FreeplayDJSettingsDialog.hx @@ -1,6 +1,10 @@ package funkin.ui.debug.char.components.dialogs; +import funkin.ui.debug.char.pages.CharCreatorFreeplayPage; +import funkin.data.freeplay.player.PlayerRegistry; + @:build(haxe.ui.macros.ComponentMacros.build("assets/exclude/data/ui/char-creator/dialogs/freeplay-dj-settings-dialog.xml")) +@:access(funkin.ui.debug.char.pages.CharCreatorFreeplayPage) class FreeplayDJSettingsDialog extends DefaultPageDialog { public var bgText1(get, never):String; @@ -27,5 +31,15 @@ class FreeplayDJSettingsDialog extends DefaultPageDialog override public function new(daPage:CharCreatorDefaultPage) { super(daPage); + + var data = cast(daPage, CharCreatorFreeplayPage).data; + + var currentChar = PlayerRegistry.instance.fetchEntry(data.importedPlayerData); + if (currentChar != null) + { + bgTextField1.value = currentChar.getFreeplayDJText(1); + bgTextField2.value = currentChar.getFreeplayDJText(2); + bgTextField3.value = currentChar.getFreeplayDJText(3); + } } } diff --git a/source/funkin/ui/debug/char/pages/CharCreatorFreeplayPage.hx b/source/funkin/ui/debug/char/pages/CharCreatorFreeplayPage.hx index b02260e392..67eaf8a561 100644 --- a/source/funkin/ui/debug/char/pages/CharCreatorFreeplayPage.hx +++ b/source/funkin/ui/debug/char/pages/CharCreatorFreeplayPage.hx @@ -134,26 +134,13 @@ class CharCreatorFreeplayPage extends CharCreatorDefaultPage function initScrollingTexts() { - var currentChar = PlayerRegistry.instance.fetchEntry(data.importedPlayerData); - var dialog:FreeplayDJSettingsDialog = cast dialogMap[FreeplayDJSettings]; - - var texts = currentChar != null ? [ - currentChar.getFreeplayDJText(1), - currentChar.getFreeplayDJText(2), - currentChar.getFreeplayDJText(3) - ] : [ - bgText1 ?? "YO IM A PLACEHOLDER", - bgText2 ?? "YOU SHOULD PUT UR TEXT IN THE DIALOG", - bgText3 ?? "IT COULD LOOK LIKE THIS" - ]; - // yanderev moment i think - text1 = new BGScrollingText(0, 220, texts[0], FlxG.width / 2, false, 60); - text2 = new BGScrollingText(0, 335, texts[0], FlxG.width / 2, false, 60); - text3 = new BGScrollingText(0, 160, texts[1], FlxG.width, true, 43); - text4 = new BGScrollingText(0, 397, texts[1], FlxG.width, true, 43); - text5 = new BGScrollingText(0, 285, texts[2], FlxG.width / 2, true, 43); - text6 = new BGScrollingText(0, orangeBackShit.y + 10, texts[0], FlxG.width / 2, 60); + text1 = new BGScrollingText(0, 220, bgText1, FlxG.width / 2, false, 60); + text2 = new BGScrollingText(0, 335, bgText1, FlxG.width / 2, false, 60); + text3 = new BGScrollingText(0, 160, bgText2, FlxG.width, true, 43); + text4 = new BGScrollingText(0, 397, bgText2, FlxG.width, true, 43); + text5 = new BGScrollingText(0, 285, bgText3, FlxG.width / 2, true, 43); + text6 = new BGScrollingText(0, orangeBackShit.y + 10, bgText1, FlxG.width / 2, 60); text1.funnyColor = text2.funnyColor = 0xFFFF9963; text3.funnyColor = text4.funnyColor = 0xFFFFF383;