fl_inventory_container panelclient
Panel defined in plugin/views/cl_inventory_container.lua
Part of Inventory
The fl_inventory_container panel is a fullscreen view that shows another inventory
next to the main inventory, the pockets and the hotbar of the local player, so that
items can be dragged between them. A player without a character, such as a gamemaster in
gamemaster mode, has no inventories of their own and sees the other inventory alone.
The server opens it for a single inventory, such as that of a container, or for all
inventories of another player. When it is removed it tells the server that the
inventories have been closed.
Summary
Methods
Methods
PANEL:create_own_inventories(own)
client plugins/inventory/plugin/views/cl_inventory_container.lua:55Creates the panels of the local player's main inventory and pockets, at the center of the screen, and of their hotbar at the bottom.
Parameters
- own Map the local player's inventories by type
Returns the ids of the inventories that are opened in the panel.
Returns
- List<Number> ids, or nil if nothing has been opened yet
Creates the fullscreen panel with the close button and the local player's main inventory, pockets and hotbar, if they have them.
Closes the panel when TAB or E is pressed.
Parameters
- key Number KEY_ enumerator
Removes the hotbar and tells the server that the opened inventories have been closed.
PANEL:open_inventory(inventory_id)
client plugins/inventory/plugin/views/cl_inventory_container.lua:121Shows the specified inventory next to the inventories of the local player, or at the center of the screen if they have none. Runs the 'OnContainerOpened' hook afterward.
Parameters
- inventory_id Number id of the inventory
PANEL:open_player_inventories(owner, inventory_ids)
client plugins/inventory/plugin/views/cl_inventory_container.lua:150Shows the inventories of another player next to the inventories of the local player, or where those would be if the local player has none.
Parameters
- owner Player the player that the inventories belong to
- inventory_ids List<Number> ids of the inventories
Draws the blurred and tinted background of the panel.
Parameters
- w Number
- h Number