|
|
|
@ -7,11 +7,13 @@ local inventoryButton
|
|
|
|
|
-- public functions
|
|
|
|
|
function Inventory.create()
|
|
|
|
|
inventoryWindow = displayUI('inventory.otui', { parent = Game.gameRightPanel })
|
|
|
|
|
inventoryButton = TopMenu.addGameButton('inventoryButton', 'Skills (Ctrl+I)', 'inventory.png', Inventory.toggle)
|
|
|
|
|
inventoryButton = TopMenu.addGameButton('inventoryButton', 'Inventory (Ctrl+I)', 'inventory.png', Inventory.toggle)
|
|
|
|
|
inventoryButton:setOn(true)
|
|
|
|
|
Hotkeys.bindKeyDown('Ctrl+I', Inventory.toggle)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function Inventory.destroy()
|
|
|
|
|
Hotkeys.unbindKeyDown('Ctrl+I')
|
|
|
|
|
inventoryWindow:destroy()
|
|
|
|
|
inventoryWindow = nil
|
|
|
|
|
inventoryButton:destroy()
|
|
|
|
|