mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Fixed Exit button not being created
It will now show/hide appropriately instead of not being created and thus throwing errors.
This commit is contained in:
@@ -4,8 +4,12 @@ local exitWindow
|
||||
local exitButton
|
||||
|
||||
function Exit.init()
|
||||
if not g_game.isOnline() then
|
||||
exitButton = TopMenu.addRightButton('exitButton', tr('Exit Client'), 'exit.png', Exit.tryExit)
|
||||
exitButton = TopMenu.addRightButton('exitButton', tr('Exit Client'), 'exit.png', Exit.tryExit)
|
||||
|
||||
if g_game.isOnline() then
|
||||
exitButton:hide()
|
||||
else
|
||||
exitButton:show()
|
||||
end
|
||||
|
||||
connect(g_game, {
|
||||
|
Reference in New Issue
Block a user