A Blazor-style UI component (Razor) for a best-time leaderboard panel. It renders a heading, a Back button, and stores a SceneFile reference; clicking Back calls Scene.Load with that SceneFile.
@using Sandbox;
@using Sandbox.UI;
@inherits PanelComponent
@namespace Sandbox
<root>
<h2>Best Time</h2>
<div class="options">
<div class="button" onclick=@Back>
Back
</div>
</div>
</root>
@code
{
[Property] public SceneFile LB { get; set; }
void Back()
{
Scene.Load(LB);
}
}