mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-03-21 20:39:52 -04:00
camera flash fix
This commit is contained in:
parent
29e1c480fd
commit
0b58a4f664
1 changed files with 5 additions and 7 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue