Fixed Exit button not being created

It will now show/hide appropriately instead of not being created and
thus throwing errors.
master
Jeffrey 11 years ago
parent 4c0c6e635e
commit 5921c8e420

@ -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, {

Loading…
Cancel
Save