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:
@@ -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()
|
||||
|
@@ -5,8 +5,8 @@ Module
|
||||
website: https://github.com/edubart/otclient
|
||||
|
||||
onLoad: |
|
||||
require 'entergame'
|
||||
require 'characterlist'
|
||||
dofile 'entergame'
|
||||
dofile 'characterlist'
|
||||
EnterGame.init()
|
||||
|
||||
onUnload: |
|
||||
|
Reference in New Issue
Block a user