# Inventory Layouts The `Inventory Layouts` is a handler for OSRS inventory. You can configure the layouts manually but the recommended way is to use {ref}`Inventory Form`. - - - ## TRSInventoryLayouItem Type that represents a single inventory layout item. - - - ## TRSInventoryLayouItem.ToJSON ```pascal function TRSInventoryLayouItem.ToJSON(): TJSONItem; ``` Convert the `TRSInventoryLayoutItem` into a `TJSONItem`. - - - ## TRSInventoryLayoutSlots Type that represents an entire inventory layout. - - - ## TRSInventoryLayout.ToJSON ```pascal function TRSInventoryLayout.ToJSON(): TJSONItem; ``` Convert the `TRSInventoryLayout` into a `TJSONItem`. - - - ## TRSInventoryLayout Main type to user {ref}`Inventory Layouts`. - - - ## InventoryLayout.SetupBankItems ```pascal procedure TRSInventoryLayout.SetupBankItems(); ``` Internal function used to setup the `TRSInventoryLayout` {ref}`TRSBankItem`s. This is automatically called for you when it's needed. - - - ## InventoryLayout.IsValid ```pascal function TRSInventoryLayout.IsValid(): Boolean; ``` Returns true/false if whatever is inr you current {ref}`Inventory` is valid for your {ref}`TRSInventoryLayout`. Example: ```pascal WriteLn layout.IsValid(); ``` - - - ## InventoryLayout.DepositDiff ```pascal function TRSInventoryLayout.DepositDiff(): Boolean; ``` Assuming the {ref}`Bank` is open, this will deposit every item in your inventory that doesn't match your {ref}`TRSInventoryLayout`. Example: ```pascal if Bank.Open() then layout.DepositDiff(); ``` - - - ## InventoryLayout.Withdraw ```pascal function TRSInventoryLayout.Withdraw(): Boolean; ``` Assuming the {ref}`Bank` is open, this will withdraw anything necessay so your {ref}`Inventory` contents match your `TRSInventoryLayout`. Example: ```pascal if Bank.Open() then layout.Withdraw(); ``` - - - ## InventoryLayout.Reorder ```pascal function TRSInventoryLayout.Reorder(): Boolean; ``` Attempts to reorder the items in your {ref}`Inventory` to it matches your `TRSInventoryLayout`. Example: ```pascal layout.Reorder(); ```