Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 939 Bytes

ctrl_inventory.md

File metadata and controls

25 lines (15 loc) · 939 Bytes

CtrlInventory

Inherits: Control

Inherited by: CtrlInventoryStacked

Description

A UI control representing a basic Inventory. Displays a list of items in the inventory.

Properties

  • inventory_path: NodePath - Path to an Inventory node.
  • default_item_icon: Texture - The default icon that will be used for items with no image property.
  • inventory: Inventory - The Inventory node linked to this control.

Methods

  • get_selected_inventory_item() -> InventoryItem - Returns the currently selected item.
  • select_inventory_item(item: InventoryItem) -> void - Selects the given item.
  • deselect_inventory_item() -> void - Deselects the selected item.

Signals

  • inventory_item_activated(InventoryItem) - Emitted when an InventoryItem is activated (i.e. double clicked).