ui/MessagePanel.razor
@using Sandbox;
@using Sandbox.UI;
@inherits Panel
@attribute [StyleSheet("MessagePanel.razor.scss")]

@*<root style="background-color:@(CardType != CardType.None || StatusEffect != null ? "#00000088" : "#00005588"); transform: scale(@(1f - DepthNum * 0.2f)); bottom:@(10f + DepthNum * 40f)px; z-index: @(-DepthNum * 3); opacity:@(1f - DepthNum * 0.15f);">*@
<root style="background-color:@(CardType != CardType.None || StatusEffect != null ? "#00000088" : "#00005588");">
	<div class="icon" style="background-image:url(@IconFilename);"></div>

	<div class="message">@Message</div>
</root>

@code
{
	public string Message { get; set; }
	public string IconFilename { get; set; }
	public CardType CardType { get; set; }
	public RelicType RelicType { get; set; }
	public int DepthNum { get; set; }

	public StatusEffect StatusEffect { get; set; }

	protected override int BuildHash()
	{
		return HashCode.Combine(
			Message,
			IconFilename,
			CardType,
			RelicType,
			DepthNum
			// Time.Now
		);
	}
}