mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
replace require with dofile, rename Hotkeys to Keyboard
This commit is contained in:
@@ -9,11 +9,11 @@ function Inventory.create()
|
||||
inventoryWindow = displayUI('inventory.otui', { parent = Game.gameRightPanel })
|
||||
inventoryButton = TopMenu.addGameButton('inventoryButton', 'Inventory (Ctrl+I)', 'inventory.png', Inventory.toggle)
|
||||
inventoryButton:setOn(true)
|
||||
Hotkeys.bindKeyDown('Ctrl+I', Inventory.toggle)
|
||||
Keyboard.bindKeyDown('Ctrl+I', Inventory.toggle)
|
||||
end
|
||||
|
||||
function Inventory.destroy()
|
||||
Hotkeys.unbindKeyDown('Ctrl+I')
|
||||
Keyboard.unbindKeyDown('Ctrl+I')
|
||||
inventoryWindow:destroy()
|
||||
inventoryWindow = nil
|
||||
inventoryButton:destroy()
|
||||
|
@@ -4,4 +4,4 @@ Module
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
onLoad: |
|
||||
require 'inventory'
|
||||
dofile 'inventory'
|
||||
|
Reference in New Issue
Block a user