ui/menu.razor

A Razor UI panel for the in-game menu. It inherits PanelComponent and renders three clickable buttons: Resume destroys the panel, Options opens a settings modal, and Exit disconnects networking and closes the game.

Networking
@inherits PanelComponent

<root>

<style>

.button {
position: absolute;
top: 70%; left: 5%;
transform: translate(0%, -50%);
font-family: courier; font-size: 32px;
pointer-events: all;
color: #fff; outline: 1px solid black;
}

</style>

<div class="button"
onclick=@(() => Destroy())>
Resume
</div>

<div class="button"
style="top: 80%;"
onclick=@(() => Game.Overlay.ShowSettingsModal())>
Options
</div>

<div class="button"
style="top: 90%;"
onclick=@(() => {
Networking.Disconnect();
Game.Close();
})>
Exit
</div>

</root>