Save gamemap height #207. UISplitter needs a rework.
This commit is contained in:
parent
d9ee4dccbe
commit
5fc1ac8051
|
@ -49,6 +49,7 @@ function init()
|
||||||
setupViewMode(0)
|
setupViewMode(0)
|
||||||
|
|
||||||
bindKeys()
|
bindKeys()
|
||||||
|
load()
|
||||||
|
|
||||||
if g_game.isOnline() then
|
if g_game.isOnline() then
|
||||||
show()
|
show()
|
||||||
|
@ -111,6 +112,7 @@ function bindKeys()
|
||||||
end
|
end
|
||||||
|
|
||||||
function terminate()
|
function terminate()
|
||||||
|
save()
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
stopSmartWalk()
|
stopSmartWalk()
|
||||||
|
@ -177,6 +179,21 @@ function hide()
|
||||||
modules.client_background.show()
|
modules.client_background.show()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function save()
|
||||||
|
local settings = {}
|
||||||
|
settings.splitterMarginBottom = bottomSplitter:getMarginBottom()
|
||||||
|
g_settings.setNode('GameInterface', settings)
|
||||||
|
end
|
||||||
|
|
||||||
|
function load()
|
||||||
|
local settings = g_settings.getNode('GameInterface')
|
||||||
|
if settings then
|
||||||
|
if settings.splitterMarginBottom then
|
||||||
|
bottomSplitter:setMarginBottom(settings.splitterMarginBottom)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function onLoginAdvice(message)
|
function onLoginAdvice(message)
|
||||||
displayInfoBox(tr("For Your Information"), message)
|
displayInfoBox(tr("For Your Information"), message)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue