From 0b58a4f66431a0979e518ae18e3af15ac7b3d44c Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Fri, 16 Feb 2024 18:58:27 -0500 Subject: [PATCH] camera flash fix --- source/funkin/util/plugins/ScreenshotPlugin.hx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/funkin/util/plugins/ScreenshotPlugin.hx b/source/funkin/util/plugins/ScreenshotPlugin.hx index afb9d3495..16d0c7244 100644 --- a/source/funkin/util/plugins/ScreenshotPlugin.hx +++ b/source/funkin/util/plugins/ScreenshotPlugin.hx @@ -166,13 +166,11 @@ class ScreenshotPlugin extends FlxBasic */ function showCaptureFeedback():Void { - if (_flashColor != null) - { - for (camera in FlxG.cameras.list) - { - camera.flash(_flashColor, CAMERA_FLASH_DURATION); - } - } + var flashBitmap = new Bitmap(new BitmapData(Std.int(FlxG.stage.width), Std.int(FlxG.stage.height), false, 0xFFFFFFFF)); + var flashSpr = new Sprite(); + flashSpr.addChild(flashBitmap); + FlxG.stage.addChild(flashSpr); + FlxTween.tween(flashSpr, {alpha: 0}, 0.15, {ease: FlxEase.quadOut, onComplete: _ -> FlxG.stage.removeChild(flashSpr)}); } static final PREVIEW_INITIAL_DELAY = 0.25; // How long before the preview starts fading in.