From 0bba89a7858ce091f485e04284f853e1f7f304af Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Sun, 6 Aug 2023 17:21:45 +0100 Subject: Reformat --- code/ui/overlay/BlindedOverlay.Network.cs | 24 ++++++------ code/ui/overlay/BlindedOverlay.razor | 9 ++--- code/ui/overlay/DeathOverlay.Network.cs | 26 ++++++++----- code/ui/overlay/DeathOverlay.razor | 29 +++++++-------- code/ui/overlay/RoleOverlay.Network.cs | 24 ++++++------ code/ui/overlay/RoleOverlay.razor | 13 +++---- code/ui/overlay/TabListEntry.cs | 20 ++++++---- code/ui/overlay/TabListOverlay.razor | 61 +++++++++++++++---------------- 8 files changed, 104 insertions(+), 102 deletions(-) (limited to 'code/ui/overlay') diff --git a/code/ui/overlay/BlindedOverlay.Network.cs b/code/ui/overlay/BlindedOverlay.Network.cs index 0a80628..83569ea 100644 --- a/code/ui/overlay/BlindedOverlay.Network.cs +++ b/code/ui/overlay/BlindedOverlay.Network.cs @@ -4,17 +4,17 @@ namespace MurderGame; public partial class BlindedOverlay { - [ClientRpc] - public static void Show( ) - { - Instance.SetClass( "hidden", false ); - Instance.ShowOverlay = true; - } + [ClientRpc] + public static void Show() + { + Instance.SetClass( "hidden", false ); + Instance.ShowOverlay = true; + } - [ClientRpc] - public static void Hide() - { - Instance.SetClass( "hidden", true ); - Instance.ShowOverlay = false; - } + [ClientRpc] + public static void Hide() + { + Instance.SetClass( "hidden", true ); + Instance.ShowOverlay = false; + } } diff --git a/code/ui/overlay/BlindedOverlay.razor b/code/ui/overlay/BlindedOverlay.razor index 0cd397a..3afe578 100644 --- a/code/ui/overlay/BlindedOverlay.razor +++ b/code/ui/overlay/BlindedOverlay.razor @@ -1,8 +1,5 @@ -@using Sandbox; -@using Sandbox.UI; - @namespace MurderGame -@inherits Panel +@inherits Sandbox.UI.Panel
-You shot a bystander! + You shot a bystander!
@code @@ -52,7 +49,7 @@ You shot a bystander! public BlindedOverlay() { - SetClass( "hidden", true ); + SetClass("hidden", true); Instance = this; } diff --git a/code/ui/overlay/DeathOverlay.Network.cs b/code/ui/overlay/DeathOverlay.Network.cs index f1f3bb2..33e354c 100644 --- a/code/ui/overlay/DeathOverlay.Network.cs +++ b/code/ui/overlay/DeathOverlay.Network.cs @@ -4,15 +4,21 @@ namespace MurderGame; public partial class DeathOverlay { - [ClientRpc] - public static void Show( ) - { - if (Instance != null) Instance.ShowOverlay = true; - } + [ClientRpc] + public static void Show() + { + if ( Instance != null ) + { + Instance.ShowOverlay = true; + } + } - [ClientRpc] - public static void Hide() - { - if (Instance != null) Instance.ShowOverlay = false; - } + [ClientRpc] + public static void Hide() + { + if ( Instance != null ) + { + Instance.ShowOverlay = false; + } + } } diff --git a/code/ui/overlay/DeathOverlay.razor b/code/ui/overlay/DeathOverlay.razor index 23c3a17..7751a38 100644 --- a/code/ui/overlay/DeathOverlay.razor +++ b/code/ui/overlay/DeathOverlay.razor @@ -1,8 +1,5 @@ -@using Sandbox; -@using Sandbox.UI; - @namespace MurderGame -@inherits Panel +@inherits Sandbox.UI.Panel
-
- Murder - This game mode is still a work in progress. Source code available at https://github.com/LMBishop/murder. -
+
+ Murder + This game mode is still a work in progress. Source code available at https://github.com/LMBishop/murder. +
-
-
- Name - Ping -
+
+
+ Name + Ping +
-
+
-
-
+
+
@code { - Dictionary Entries = new(); - + readonly Dictionary Entries = new(); + public Panel List { get; set; } public static TabListOverlay Instance { get; private set; } @@ -105,38 +104,38 @@ tablistoverlay { Instance = this; } - public bool IsOpen => Input.Down( "score" ); + public bool IsOpen => Input.Down("score"); public override void Tick() { base.Tick(); - SetClass( "hidden", !IsOpen ); + SetClass("hidden", !IsOpen); - if ( !IsVisible ) + if (!IsVisible) return; - foreach ( IClient cl in Game.Clients.Except( Entries.Keys ) ) + foreach (var cl in Game.Clients.Except(Entries.Keys)) { TabListEntry entry = new(); Entries.Add(cl, entry); entry.UpdateFrom(cl); - entry.Parent = List; + entry.Parent = List; } - foreach ( IClient cl in Entries.Keys.Except( Game.Clients ) ) + foreach (var cl in Entries.Keys.Except(Game.Clients)) { - if( Entries.TryGetValue( cl, out var entry ) ) + if (Entries.TryGetValue(cl, out var entry)) { entry.Delete(); - Entries.Remove( cl ); + Entries.Remove(cl); } } - - // foreach ( var entry in Entries ) - // { - // entry.Value.Parent = List; - // } + + // foreach ( var entry in Entries ) + // { + // entry.Value.Parent = List; + // } } } \ No newline at end of file -- cgit v1.2.3-70-g09d2