mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
a lot of changes in modules
This commit is contained in:
@@ -24,6 +24,9 @@ function TopMenu.init()
|
||||
|
||||
TopMenu.addRightButton('logoutButton', 'Logout (Ctrl+Q)', '/core_styles/icons/logout.png', onLogout)
|
||||
Keyboard.bindKeyDown('Ctrl+Q', onLogout)
|
||||
|
||||
connect(Game, { onLogin = TopMenu.showGameButtons,
|
||||
onLogout = TopMenu.hideGameButtons })
|
||||
end
|
||||
|
||||
function TopMenu.terminate()
|
||||
@@ -33,6 +36,9 @@ function TopMenu.terminate()
|
||||
gameButtonsPanel = nil
|
||||
topMenu:destroy()
|
||||
topMenu = nil
|
||||
|
||||
disconnect(Game, { onLogin = TopMenu.showGameButtons,
|
||||
onLogout = TopMenu.hideGameButtons })
|
||||
end
|
||||
|
||||
function TopMenu.addButton(id, description, icon, callback, right)
|
||||
@@ -82,6 +88,3 @@ end
|
||||
function TopMenu.getButton(id)
|
||||
return topMenu:recursiveGetChildById(id)
|
||||
end
|
||||
|
||||
connect(Game, { onLogin = TopMenu.showGameButtons,
|
||||
onLogout = TopMenu.hideGameButtons })
|
||||
|
@@ -3,6 +3,8 @@ Module
|
||||
description: Create the top menu
|
||||
author: OTClient team
|
||||
website: https://github.com/edubart/otclient
|
||||
autoload: true
|
||||
autoload-antecedence: 120
|
||||
|
||||
onLoad: |
|
||||
dofile 'topmenu'
|
||||
|
Reference in New Issue
Block a user