From 71db52c5443a7bf82d9a23a770994a42b043be04 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Thu, 27 Jul 2023 22:11:31 +0100 Subject: Initial commit --- code/ui/team/TeamInfo.razor | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 code/ui/team/TeamInfo.razor (limited to 'code/ui/team/TeamInfo.razor') diff --git a/code/ui/team/TeamInfo.razor b/code/ui/team/TeamInfo.razor new file mode 100644 index 0000000..18e1f7f --- /dev/null +++ b/code/ui/team/TeamInfo.razor @@ -0,0 +1,37 @@ +@using Sandbox; +@using Sandbox.UI; + +@namespace MurderGame +@inherits Panel + + + +
+@GetTeamName() +
+ +@code +{ + public string Colour { get; set; } + + public string GetTeamName() + { + var ClientPawn = Game.LocalPawn; + if (ClientPawn is Player) + { + return TeamOperations.GetTeamName(((Player)ClientPawn).CurrentTeam); + } + return ""; + } + + protected override int BuildHash() + { + return GetTeamName().GetHashCode(); + } +} -- cgit v1.2.3-70-g09d2