From 9802fbd2aa945b8378499bcb826b93c5984ede32 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 20 Oct 2024 18:40:14 -0500 Subject: [PATCH] simple fix for credits overflow --- src/hollywoo_flixel/FlxDirector.kiss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hollywoo_flixel/FlxDirector.kiss b/src/hollywoo_flixel/FlxDirector.kiss index 6f58514..072a297 100644 --- a/src/hollywoo_flixel/FlxDirector.kiss +++ b/src/hollywoo_flixel/FlxDirector.kiss @@ -1106,6 +1106,14 @@ (+= textY threeColSize creditMargin)) (otherwise))) + // Squish overflowing texts inward: + (doFor text creditsText + (when (< text.x 0) + (text.setGraphicSize (- text.width (- text.x))) + (set text.x 0)) + (when (> (+ text.x text.width) FlxG.width) + (text.setGraphicSize (- text.width (- (+ text.x text.width) FlxG.width))))) + (let [pixelsToScroll (+ textY .height (last creditsText)) idealTimeLimit