mirror of
https://github.com/edubart/otclient.git
synced 2025-05-11 06:49:20 +02:00
Proper gameinterface load sequence, thanks @Quintinon
https://github.com/edubart/otclient/pull/677
This commit is contained in:
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…
x
Reference in New Issue
Block a user