@namespace MurderGame @using System.Collections.Generic @using System.Linq @using Sandbox @using Sandbox.UI @inherits Panel
Murder This game mode is still a work in progress. Source code available at https://github.com/LMBishop/murder.
Name Ping
@code { readonly Dictionary Entries = new(); public Panel List { get; set; } public static TabListOverlay Instance { get; private set; } public TabListOverlay() { Instance = this; } public bool IsOpen => Input.Down("score"); public override void Tick() { base.Tick(); SetClass("hidden", !IsOpen); if (!IsVisible) return; foreach (var cl in Game.Clients.Except(Entries.Keys)) { TabListEntry entry = new(); Entries.Add(cl, entry); entry.UpdateFrom(cl); entry.Parent = List; } foreach (var cl in Entries.Keys.Except(Game.Clients)) { if (Entries.TryGetValue(cl, out var entry)) { entry.Delete(); Entries.Remove(cl); } } // foreach ( var entry in Entries ) // { // entry.Value.Parent = List; // } } }