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 (7)
  • 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
  • width Fixed width in slate units; zero lets the content decide
  • height Fixed height in slate units; zero lets the content decide
  • padding Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
  • halign Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
  • valign Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
Inherited from Object (5)