ui.Inventory

ui.Inventory

class

Grid of item slots showing an inventory with the game's own slot widget

Fields

NameTypeDescription
inventory InventoryAccess Inventory shown; nil or an empty one hides the grid
numbers boolean True draws the item counts in the slots
columns integer Slots per row, at least one
Inherited from ui.Widget (3)
  • visible Hidden widgets keep their place in the tree and take no input
  • fill Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
  • valign Where the widget sits in the height of an HBox row: "fill", "top", "center" or "bottom"
Inherited from Object (5)