replace require with dofile, rename Hotkeys to Keyboard

This commit is contained in:
Eduardo Bart
2012-02-06 02:39:52 -02:00
parent 64c9e4f1d5
commit f97104f12e
41 changed files with 284 additions and 126 deletions

View File

@@ -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()

View File

@@ -4,4 +4,4 @@ Module
author: OTClient team
website: https://github.com/edubart/otclient
onLoad: |
require 'inventory'
dofile 'inventory'