Keep g_settings as a 'static' variable rather than a direct object.

This commit is contained in:
BenDol
2014-04-01 16:51:38 +13:00
parent b295053662
commit 79ee0e34ea
18 changed files with 174 additions and 99 deletions

View File

@@ -178,11 +178,11 @@ end
function save()
local settings = {}
settings.splitterMarginBottom = bottomSplitter:getMarginBottom()
g_settings:setNode('game_interface', settings)
g_settings.setNode('game_interface', settings)
end
function load()
local settings = g_settings:getNode('game_interface')
local settings = g_settings.getNode('game_interface')
if settings then
if settings.splitterMarginBottom then
bottomSplitter:setMarginBottom(settings.splitterMarginBottom)