From 3867e4bdcae322c875bc862b9aeaed6cb2038eb6 Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Thu, 11 Sep 2025 15:16:18 -0400 Subject: [PATCH] This should keep the text visible after playtesting. --- source/funkin/ui/debug/ChartPlaytestState.hx | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/source/funkin/ui/debug/ChartPlaytestState.hx b/source/funkin/ui/debug/ChartPlaytestState.hx index fa822b3e9..b0f2345ce 100644 --- a/source/funkin/ui/debug/ChartPlaytestState.hx +++ b/source/funkin/ui/debug/ChartPlaytestState.hx @@ -1,5 +1,6 @@ package funkin.ui.debug; +import flixel.FlxSubState; import flixel.text.FlxText; import flixel.tweens.FlxTween; import flixel.util.FlxTimer; @@ -22,6 +23,8 @@ class ChartPlaytestState extends MusicBeatState var items:MenuTypedList>; + var justClosedSubstate:Bool = false; + public function new(params:ChartPlaytestStateParams) { super(); @@ -33,6 +36,20 @@ class ChartPlaytestState extends MusicBeatState add(items); createItems(); + + // Try to force the camera not to move + this.camera.follow(null); + this.camera.x = 0; + this.camera.y = 0; + this.camera.scroll.x = 0; + this.camera.scroll.y = 0; + } + + override function update(elapsed:Float):Void + { + super.update(elapsed); + + if (this.subState == null) {} } function createItems():Void @@ -55,6 +72,7 @@ class ChartPlaytestState extends MusicBeatState var txt:FlxText = new FlxText(0, 0, name); txt.antialiasing = false; txt.setFormat(Paths.font('vcr.ttf'), 32); + txt.scrollFactor.set(0, 0); var menuItem:MenuTypedItem = new MenuTypedItem(10, 36 * items.length, txt, name, onChange); menuItem.setEmptyBackground(); @@ -99,6 +117,20 @@ class ChartPlaytestState extends MusicBeatState return menuItem; } + + override function onCloseSubStateComplete(targetState:FlxSubState):Void + { + super.onCloseSubStateComplete(targetState); + + justClosedSubstate = true; + + // Try to force the camera not to move + this.camera.follow(null); + this.camera.x = 0; + this.camera.y = 0; + this.camera.scroll.x = 0; + this.camera.scroll.y = 0; + } } typedef ChartPlaytestStateParams =