1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 09:33:21 +08:00
osu-lazer/osu.Game/Screens/BlurrableBackgroundScreen.cs
Dean Herbert 8230d5b52e Ensure initial blur is set on song select background creation
We do not want the blur transition to play here
2019-03-12 17:27:20 +09:00

24 lines
708 B
C#

// 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.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Transforms;
using osu.Game.Graphics.Backgrounds;
using osuTK;
namespace osu.Game.Screens
{
public abstract class BlurrableBackgroundScreen : BackgroundScreen
{
protected Background Background;
protected Vector2 BlurTarget;
public TransformSequence<Background> BlurTo(Vector2 sigma, double duration = 0, Easing easing = Easing.None)
{
BlurTarget = sigma;
return Background?.BlurTo(BlurTarget, duration, easing);
}
}
}