Skip to content

Commit

Permalink
import bgtext
Browse files Browse the repository at this point in the history
  • Loading branch information
lemz1 committed Nov 17, 2024
1 parent 952056c commit 7b24398
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
}
}
25 changes: 6 additions & 19 deletions source/funkin/ui/debug/char/pages/CharCreatorFreeplayPage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b24398

Please sign in to comment.