UI/ShipSelect/ShipListHint.razor
@using Sandbox.UI
@inherits Panel
<style>
ShipListHint {
position: absolute;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
align-content: center;
transition: all 0.2s sin-ease-in-out;
opacity: 0;
.label {
flex-direction: column;
.text {
text-align: center;
font-family: "Wallpoet";
font-size: 54px;
color: rgba(0, 255, 255, 0.85);
text-shadow: 0px 0px 12px rgba(0,255,255,0.5);
padding-top: 24px;
}
.small {
font-size: 34px;
}
}
&.open {
opacity: 1;
}
}
</style>
<root class="@(_open ? "open" : "")">
<div class="label">
<label class="text">@AttackerName</label>
@if ( PilotGame.Gamemode != FPGameMode.Instagib )
{
<label class="text small">- -[Press @Input.GetButtonOrigin("menu") TO SWITCH SHIPS]- -</label>
}
</div>
</root>
@code
{
public static ShipListHint Current;
public string AttackerName { get; private set; } = "";
private bool _open;
public ShipListHint()
{
Current = this;
}
public void ShowAttacker( string name )
{
AttackerName = name;
_open = true;
}
public void HideAttacker()
{
_open = false;
}
protected override int BuildHash() => HashCode.Combine( AttackerName, _open );
}