TinyAdventure/ui/item_slot.gd

8 lines
157 B
GDScript

class_name ItemSlot
extends PanelContainer
@onready var texture_rect:TextureRect = %TextureRect
func display(item:Item):
texture_rect.texture = item.icon