From 5480d5480fde35bb04da8a9f61f35a3bf9e40373 Mon Sep 17 00:00:00 2001 From: Kade <26305836+Kade-github@users.noreply.github.com> Date: Sat, 28 Dec 2024 14:40:19 -0800 Subject: [PATCH] Custom render distance strumline --- source/funkin/play/notes/Strumline.hx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/funkin/play/notes/Strumline.hx b/source/funkin/play/notes/Strumline.hx index e894f9c627..dcfeca2cc1 100644 --- a/source/funkin/play/notes/Strumline.hx +++ b/source/funkin/play/notes/Strumline.hx @@ -36,8 +36,21 @@ class Strumline extends FlxSpriteGroup static var RENDER_DISTANCE_MS(get, never):Float; + /** + * The custom render distance for the strumline. + * This should be in miliseconds only! Not pixels. + */ + public static var CUSTOM_RENDER_DISTANCE_MS:Float = 0.0; + + /** + * Whether to use the custom render distance. + * If false, the render distance will be calculated based on the screen height. + */ + public static var USE_CUSTOM_RENDER_DISTANCE:Bool = false; + static function get_RENDER_DISTANCE_MS():Float { + if (USE_CUSTOM_RENDER_DISTANCE) return CUSTOM_RENDER_DISTANCE_MS; return FlxG.height / Constants.PIXELS_PER_MS; }