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

@@ -57,7 +57,7 @@ end
-- public functions
function EnterGame.init()
enterGameButton = TopMenu.addButton('enterGameButton', 'Login (Ctrl + G)', '/core_styles/icons/login.png', EnterGame.openWindow)
Hotkeys.bindKeyDown('Ctrl+G', EnterGame.openWindow)
Keyboard.bindKeyDown('Ctrl+G', EnterGame.openWindow)
motdButton = TopMenu.addButton('motdButton', 'Message of the day', '/core_styles/icons/motd.png', EnterGame.displayMotd)
motdButton:hide()
enterGame = displayUI('entergame.otui')
@@ -82,7 +82,7 @@ function EnterGame.init()
end
function EnterGame.terminate()
Hotkeys.unbindKeyDown('Ctrl+G')
Keyboard.unbindKeyDown('Ctrl+G')
enterGame:destroy()
enterGame = nil
enterGameButton:destroy()

View File

@@ -5,8 +5,8 @@ Module
website: https://github.com/edubart/otclient
onLoad: |
require 'entergame'
require 'characterlist'
dofile 'entergame'
dofile 'characterlist'
EnterGame.init()
onUnload: |