ESCInventoryContainer
Extends: Control
Description
Inventory container handler that acts as a base for UIs inventory containers.
Members
item_focused
var item_focused: bool
Whether any item in the container is currently focused.
Methods
is_empty
func is_empty() -> bool
Whether the inventory container currently is empty.
Parameters
None.
Returns
Returns whether the inventory container currently is empty. Whether the container is empty or not. (bool)
add_item
func add_item(inventory_item: ESCInventoryItem) -> ESCInventoryButton
Adds a new item into the container and returns the control generated for it so its events can be handled by the inputs manager.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
inventory_item |
|
Item to add. |
yes |
Returns
Returns the button generated for the item. (ESCInventoryButton)
remove_item
func remove_item(inventory_item: ESCInventoryItem) -> void
Removes an item from the container.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
inventory_item |
|
Item to remove. |
yes |
Returns
Returns nothing.