From 49846dbc13c87f995d6da8fa02064be3a8d18e4f Mon Sep 17 00:00:00 2001 From: AbnormalPoof Date: Thu, 5 Feb 2026 18:21:04 -0600 Subject: [PATCH] Re-export the Title Screen text to texture atlas --- astc-compression-data.json | 4 ++-- source/funkin/ui/title/TitleState.hx | 19 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/astc-compression-data.json b/astc-compression-data.json index 716857ced..387bc2e01 100644 --- a/astc-compression-data.json +++ b/astc-compression-data.json @@ -154,8 +154,8 @@ "assets/preload/images/soundtray/", "assets/preload/images/stageBuild/", "assets/preload/images/storymenu/titles/", - "assets/preload/images/titleEnter.png", - "assets/preload/images/titleEnter_mobile.png", + "assets/preload/images/title-screen-text/spritemap1.png", + "assets/preload/images/title-screen-text-mobile/spritemap1.png", "assets/preload/images/ui/popup/pixel/*", "assets/shared/images/characters/abotPixel/*", "assets/shared/images/characters/bfPixel.png", diff --git a/source/funkin/ui/title/TitleState.hx b/source/funkin/ui/title/TitleState.hx index 95fd23f70..748a0e4f1 100644 --- a/source/funkin/ui/title/TitleState.hx +++ b/source/funkin/ui/title/TitleState.hx @@ -93,16 +93,15 @@ class TitleState extends MusicBeatState add(logoBl); add(gfDance); - #if mobile - // shift it a bit more to the left on mobile!! - titleText = new FunkinSprite(50 + (FullScreenScaleMode.gameCutoutSize.x / 2), FlxG.height * 0.8); - titleText.frames = Paths.getSparrowAtlas('titleEnter_mobile'); - #else - titleText = new FunkinSprite(100 + (FullScreenScaleMode.gameCutoutSize.x / 2), FlxG.height * 0.8); - titleText.frames = Paths.getSparrowAtlas('titleEnter'); - #end - titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24); - titleText.animation.addByPrefix('press', "ENTER PRESSED", 24); + var titleTextPath:String = 'title-screen-text' #if mobile + '-mobile' #end; + + // On mobile, the text is shifted more to the left to center it properly. + titleText = FunkinSprite.createTextureAtlas(#if mobile 50 #else 100 #end + (FullScreenScaleMode.gameCutoutSize.x / 2), FlxG.height * 0.8, titleTextPath, + { + cacheOnLoad: true + }); + titleText.anim.addByFrameLabel('idle', "Idle", 24); + titleText.anim.addByFrameLabel('press', "Confirm", 24); titleText.animation.play('idle'); titleText.updateHitbox(); titleText.shader = swagShader.shader;