-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathTestBlurredBackgroundImageScreenView.cs
More file actions
45 lines (40 loc) · 1.28 KB
/
TestBlurredBackgroundImageScreenView.cs
File metadata and controls
45 lines (40 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using Microsoft.Xna.Framework;
using Wobble.Assets;
using Wobble.Graphics.Shaders;
using Wobble.Graphics.Sprites;
using Wobble.Graphics.UI;
using Wobble.Screens;
namespace Wobble.Tests.Screens.Tests.BlurredBgImage
{
public class TestBlurredBackgroundImageScreenView : ScreenView
{
public TestBlurredBackgroundImageScreenView(Screen screen) : base(screen)
{
using var blur = new GaussianBlur(1.1f);
var image = blur.PerformGaussianBlur(WobbleAssets.Wallpaper);
var background = new BackgroundImage(image)
{
Parent = Container,
Image = image
};
}
/// <inheritdoc />
/// <summary>
/// </summary>
/// <param name="gameTime"></param>
public override void Update(GameTime gameTime) => Container?.Update(gameTime);
/// <inheritdoc />
/// <summary>
/// </summary>
/// <param name="gameTime"></param>
public override void Draw(GameTime gameTime)
{
GameBase.Game.GraphicsDevice.Clear(Color.Black);
Container?.Draw(gameTime);
}
/// <inheritdoc />
/// <summary>
/// </summary>
public override void Destroy() => Container?.Destroy();
}
}