mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-02-18 12:51:26 -05:00
Merge branch 'rewrite/master' into anim-editor-stuffs
This commit is contained in:
commit
905d47c005
1 changed files with 5 additions and 1 deletions
|
@ -13,6 +13,7 @@ import flixel.util.FlxSignal;
|
||||||
import flixel.util.FlxTimer;
|
import flixel.util.FlxTimer;
|
||||||
import funkin.graphics.FunkinSprite;
|
import funkin.graphics.FunkinSprite;
|
||||||
import funkin.input.Cursor;
|
import funkin.input.Cursor;
|
||||||
|
import funkin.audio.FunkinSound;
|
||||||
import openfl.display.Bitmap;
|
import openfl.display.Bitmap;
|
||||||
import openfl.display.Sprite;
|
import openfl.display.Sprite;
|
||||||
import openfl.display.BitmapData;
|
import openfl.display.BitmapData;
|
||||||
|
@ -162,7 +163,7 @@ class ScreenshotPlugin extends FlxBasic
|
||||||
final CAMERA_FLASH_DURATION = 0.25;
|
final CAMERA_FLASH_DURATION = 0.25;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Visual (and audio?) feedback when a screenshot is taken.
|
* Visual and audio feedback when a screenshot is taken.
|
||||||
*/
|
*/
|
||||||
function showCaptureFeedback():Void
|
function showCaptureFeedback():Void
|
||||||
{
|
{
|
||||||
|
@ -171,6 +172,9 @@ class ScreenshotPlugin extends FlxBasic
|
||||||
flashSpr.addChild(flashBitmap);
|
flashSpr.addChild(flashBitmap);
|
||||||
FlxG.stage.addChild(flashSpr);
|
FlxG.stage.addChild(flashSpr);
|
||||||
FlxTween.tween(flashSpr, {alpha: 0}, 0.15, {ease: FlxEase.quadOut, onComplete: _ -> FlxG.stage.removeChild(flashSpr)});
|
FlxTween.tween(flashSpr, {alpha: 0}, 0.15, {ease: FlxEase.quadOut, onComplete: _ -> FlxG.stage.removeChild(flashSpr)});
|
||||||
|
|
||||||
|
// Play a sound (auto-play is true).
|
||||||
|
FunkinSound.load(Paths.sound('screenshot'), 1.0, false, true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final PREVIEW_INITIAL_DELAY = 0.25; // How long before the preview starts fading in.
|
static final PREVIEW_INITIAL_DELAY = 0.25; // How long before the preview starts fading in.
|
||||||
|
|
Loading…
Reference in a new issue