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

@@ -45,11 +45,11 @@ function Skills.create()
skillsWindow = displayUI('skills.otui', { parent = Game.gameRightPanel })
skillsWindow:hide()
skillsButton = TopMenu.addGameButton('skillsButton', 'Skills (Ctrl+S)', '/core_styles/icons/skills.png', Skills.toggle)
Hotkeys.bindKeyDown('Ctrl+S', Skills.toggle)
Keyboard.bindKeyDown('Ctrl+S', Skills.toggle)
end
function Skills.destroy()
Hotkeys.unbindKeyDown('Ctrl+S')
Keyboard.unbindKeyDown('Ctrl+S')
skillsButton:destroy()
skillsButton = nil
skillsWindow:destroy()

View File

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