UI/KillFeed/KillFeedEntry.cs
using Sandbox.UI;
using Sandbox.UI.Construct;
/// <summary>Individual kill feed entry that auto-deletes after 6 seconds.</summary>
public sealed class KillFeedEntry : Panel
{
public Label Left { get; }
public Label Right { get; }
public Label Method { get; }
private RealTimeSince _timeSinceBorn;
public KillFeedEntry()
{
Left = Add.Label( "", "left" );
Method = Add.Label( "", "method" );
Right = Add.Label( "", "right" );
}
public override void Tick()
{
base.Tick();
if ( _timeSinceBorn > 6f )
Delete();
}
}