@using Sandbox.UI @using Sasalka @inherits Sandbox.UI.Panel @namespace Sasalka.Ui OnItemRightClick?.Invoke( Item ) )> @* *@ @if ( Item.Definition.ImageTexture.IsValid() ) { @Item.Definition.Name } else if ( Item.Definition.ImageUrl.Length > 0 ) { @Item.Definition.Name }
@Item?.Definition.Name
@if ( Item?.Definition.MaxCount > 1 ) {
@Item?.Count / @Item?.Definition.MaxCount
}
@code { public Sasalka.InventoryItem Item { get; set; } public Action OnItemClick { get; set; } public Action OnItemRightClick { get; set; } public bool Equipped { get; set; } protected override int BuildHash() { base.BuildHash(); var hash = new HashCode(); hash.Add( Item.Count ); return hash.ToHashCode(); } }