Pulls in FPS menu so we can make edits
This commit is contained in:
40
code/UI/MainMenu/FrontPage.razor
Normal file
40
code/UI/MainMenu/FrontPage.razor
Normal file
@@ -0,0 +1,40 @@
|
||||
@using Sandbox;
|
||||
@using System.Linq;
|
||||
@using System.Threading.Tasks;
|
||||
@using Sandbox.Menu;
|
||||
@using Sandbox.UI;
|
||||
@namespace LuckerGame.UI.MainMenu
|
||||
|
||||
<root>
|
||||
<div class="game-title">
|
||||
@Game.Menu.Package.Title
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
@if (Game.InGame)
|
||||
{
|
||||
<a class="button" onclick=@LeaveGame>Leave</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a class="button" href="/setup">Play</a>
|
||||
|
||||
<a class="button" href="/lobby/list">Lobbies</a>
|
||||
|
||||
@if ( Game.Menu.Package.SupportsSavedGames && Game.Menu.SavedGames.Any())
|
||||
{
|
||||
<a class="button" href="/setup/save">Load Save</a>
|
||||
}
|
||||
}
|
||||
|
||||
<a class="button" @onclick=@Game.Menu.Close>Quit</a>
|
||||
</div>
|
||||
</root>
|
||||
|
||||
@code
|
||||
{
|
||||
void LeaveGame()
|
||||
{
|
||||
Game.Menu.LeaveServer( "Leaving" );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user