aboutsummaryrefslogtreecommitdiffstats
path: root/code/ui/overlay/BlindedOverlay.razor
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-07-27 22:11:31 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-07-27 22:11:31 +0100
commit71db52c5443a7bf82d9a23a770994a42b043be04 (patch)
treef75f2605bb1bdc53842cd85c90d105dcc77e1c10 /code/ui/overlay/BlindedOverlay.razor
Initial commit
Diffstat (limited to 'code/ui/overlay/BlindedOverlay.razor')
-rw-r--r--code/ui/overlay/BlindedOverlay.razor65
1 files changed, 65 insertions, 0 deletions
diff --git a/code/ui/overlay/BlindedOverlay.razor b/code/ui/overlay/BlindedOverlay.razor
new file mode 100644
index 0000000..024c31a
--- /dev/null
+++ b/code/ui/overlay/BlindedOverlay.razor
@@ -0,0 +1,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();
+ }
+
+} \ No newline at end of file