2019-01-24 17:43:03 +09:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-09-21 03:13:34 +09:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Transforms;
|
|
|
|
|
using osu.Game.Graphics.Backgrounds;
|
2018-11-20 16:51:59 +09:00
|
|
|
|
using osuTK;
|
2018-09-21 03:13:34 +09:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens
|
|
|
|
|
{
|
|
|
|
|
public abstract class BlurrableBackgroundScreen : BackgroundScreen
|
|
|
|
|
{
|
|
|
|
|
protected Background Background;
|
|
|
|
|
|
|
|
|
|
protected Vector2 BlurTarget;
|
|
|
|
|
|
2019-03-12 17:27:20 +09:00
|
|
|
|
public TransformSequence<Background> BlurTo(Vector2 sigma, double duration = 0, Easing easing = Easing.None)
|
2019-03-01 11:49:04 +09:00
|
|
|
|
{
|
|
|
|
|
BlurTarget = sigma;
|
|
|
|
|
return Background?.BlurTo(BlurTarget, duration, easing);
|
|
|
|
|
}
|
2018-09-21 03:13:34 +09:00
|
|
|
|
}
|
|
|
|
|
}
|