mirror of
https://github.com/edubart/otclient.git
synced 2025-04-30 01:29:21 +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:
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)
|
||||
|
||||
if g_game.isOnline() then
|
||||
exitButton:hide()
|
||||
else
|
||||
exitButton:show()
|
||||
end
|
||||
|
||||
connect(g_game, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user