aboutsummaryrefslogtreecommitdiffstats
path: root/code/ui/overlay/BlindedOverlay.razor
blob: 024c31ae18c99ea75d8a0e331b6fd1015c7b4c79 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@using Sandbox;
@using Sandbox.UI;

@namespace MurderGame
@inherits Panel

<style>
    @@keyframes fadeIn 
    {
	    0% { opacity: 0; }
	    100% { opacity: 1; }
	}
    blindedoverlay
    {
        position: absolute;
        left: 0;
        top: 0;
        background-color: rgba(0, 0, 0, 0.80);
        width: 100vw;
        height: 100vh;
		backdrop-filter-blur: 16px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        flex-direction: column;
        gap: 100vh;
        animation-name: fadeIn;
        animation-duration: 1s;
        animation-iteration-count: 1;
        animation-timing-function: linear;
        animation-fill-mode: forwards;
    }
    .overlay-message
    {
        margin: 20vh;
        color: white;
        font-size: 35px;
        font-family: "Roboto";
        font-weight: 700;
    }
</style>

<div class="overlay-message">
You shot a bystander!
</div>

@code
{
    public static BlindedOverlay Instance { get; private set; }

    public bool ShowOverlay { get; set; } = false;

	public BlindedOverlay()
    {
        SetClass( "hidden", true );

        Instance = this;
    }

	protected override int BuildHash()
    {
        return ShowOverlay.GetHashCode();
    }

}