Proper gameinterface load sequence, thanks @Quintinon

https://github.com/edubart/otclient/pull/677
master
BenDol 9 years ago
parent 6c5549dd46
commit 0afbfd58ce

@ -27,6 +27,15 @@ function init()
onLoginAdvice = onLoginAdvice,
}, true)
-- Call load AFTER game window has been created and
-- resized to a stable state, otherwise the saved
-- settings can get overridden by false onGeometryChange
-- events
connect(g_app, {
onRun = load,
onExit = save
})
gameRootPanel = g_ui.displayUI('gameinterface')
gameRootPanel:hide()
gameRootPanel:lower()
@ -49,7 +58,6 @@ function init()
setupViewMode(0)
bindKeys()
load()
if g_game.isOnline() then
show()
@ -102,7 +110,6 @@ function unbindWalkKey(key)
end
function terminate()
save()
hide()
hookedMenuOptions = {}

Loading…
Cancel
Save