Pulls in FPS menu so we can make edits
This commit is contained in:
32
code/UI/MainMenu/SlimPackageCard.razor
Normal file
32
code/UI/MainMenu/SlimPackageCard.razor
Normal file
@@ -0,0 +1,32 @@
|
||||
@using System;
|
||||
@using Sandbox;
|
||||
@namespace LuckerGame.UI.MainMenu
|
||||
@inherits Sandbox.UI.Panel
|
||||
|
||||
<root>
|
||||
@if ( Package == null )
|
||||
{
|
||||
<div class="button" @onclick=@OnCardClicked>Select Package</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="button" @onclick=@OnCardClicked>@Package.Title</div>
|
||||
<i tooltip="See information about this package" @onclick=@( () => Game.Overlay.ShowPackageModal( Package.FullIdent ) )>info</i>
|
||||
}
|
||||
</root>
|
||||
|
||||
@code
|
||||
{
|
||||
public Package Package { get; set; }
|
||||
public System.Action OnLaunch { get; set; }
|
||||
|
||||
void OnCardClicked()
|
||||
{
|
||||
OnLaunch?.Invoke();
|
||||
}
|
||||
|
||||
protected override int BuildHash()
|
||||
{
|
||||
return HashCode.Combine( Package );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user