mirror of
https://github.com/celisej567/gm_construct_port.git
synced 2026-09-19 20:11:46 +03:00
Add files via upload
This commit is contained in:
24
code/ui/InventoryIcon.cs
Normal file
24
code/ui/InventoryIcon.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
using Sandbox;
|
||||
using Sandbox.UI;
|
||||
using Sandbox.UI.Construct;
|
||||
|
||||
public class InventoryIcon : Panel
|
||||
{
|
||||
public Entity TargetEnt;
|
||||
public Label Label;
|
||||
public Label Number;
|
||||
|
||||
public InventoryIcon( int i, Panel parent )
|
||||
{
|
||||
Parent = parent;
|
||||
Label = Add.Label( "empty", "item-name" );
|
||||
Number = Add.Label( $"{i}", "slot-number" );
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
Label.Text = "";
|
||||
SetClass( "active", false );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user