@using Sandbox; @using Sandbox.UI; @inherits Panel @namespace ShooterGame <root> <column class="flex-col items-end bg-neutral-950"> <div class="relative min-w-40 min-h-20 items-end text-6xl"> @{ /* Background */ } <label class="absolute px-4 right-0 top-0 bottom-0 items-end opacity-25"> 054 </label> @{ /* Foreground */ } <label class="absolute px-4 right-0 top-0 bottom-0 items-end"> 54 </label> </div> @{ /* Bottom bar */ } <label class="text-sm uppercase bg-neutral-900 px-4 py-2 w-full items-end text-right"> Health </label> </column> </root> @code { protected override int BuildHash() => System.HashCode.Combine(Time.Now); public PlayerVitals PlayerVitals => Player.Local.Vitals; public string Health => $"{PlayerVitals.Health.CeilToInt()}"; public string PaddedHealth => $"{PlayerVitals.Health.CeilToInt():D3}"; }