Constructor
new InventoryUI(element)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement | The container element. |
Members
draggingOverSlot :ClubCrawler.Objects.Inventory.InventoryItemSlot
- Source:
An inventory item slot which is being dragged over.
Type:
draggingSlot :ClubCrawler.Objects.Inventory.InventoryItemSlot
- Source:
An inventory item slot which is being dragged.
Type:
element :HTMLElement
- Source:
The containing html element.
Type:
- HTMLElement
inventory :ClubCrawler.Objects.Inventory.Inventory
- Source:
The inventory to interface with, loaded on runtime.
Type:
slots :Array
- Source:
The inventory slots.
Type:
- Array
slotsContainer :HTMLElement
- Source:
Contains the inventory slot displays.
Type:
- HTMLElement
titleElement :HTMLElement
- Source:
Contains the word "inventory".
Type:
- HTMLElement
uiManager :ClubCrawler.Objects.DOMUserInterface.DOMUIManager
- Source:
The UI manager, loaded on runtime.
Type:
- ClubCrawler.Objects.DOMUserInterface.DOMUIManager
Methods
clearInventory()
- Source:
Clears inventory and DOM elements.
loadInventory(inventory)
- Source:
Loads an inventory.
Parameters:
Name | Type | Description |
---|---|---|
inventory |
ClubCrawler.Objects.Inventory.Inventory | The inventory to be displayed. |
loadManager(uiManager)
- Source:
Loads the UI Manager.
Parameters:
Name | Type | Description |
---|---|---|
uiManager |
ClubCrawler.DOMUserInterface.DOMUIManager | The UI Manager. |
refreshInventory()
- Source:
Calls updateDisplay on each UI slot to refresh it from inventory.
setDragListeners()
- Source:
Sets event listeners and logic for the drag-to-rearrange functionality of the inventory UI.