Fix skin and locale at first run, adding new locale to combobox, exit function double call, enable sound option

This commit is contained in:
Henrique
2012-06-20 03:31:52 -03:00
parent eb457bf9cd
commit db4ced65eb
5 changed files with 19 additions and 10 deletions

View File

@@ -30,3 +30,7 @@ Panel
OptionCheckBox
id: showPrivateMessagesOnScreen
!text: tr('Show private messages on screen')
OptionCheckBox
id: enableMusic
!text: tr('Enable music')

View File

@@ -13,7 +13,8 @@ local options = { vsync = false,
showTimestampsInConsole = true,
showLevelsInConsole = true,
showPrivateMessagesInConsole = false,
showPrivateMessagesOnScreen = true }
showPrivateMessagesOnScreen = true,
enableMusic = true }
local generalPanel
local graphicsPanel
@@ -124,6 +125,10 @@ function Options.setOption(key, value)
addEvent(function()
g_window.setFullscreen(value)
end)
elseif key == 'enableMusic' then
addEvent(function()
g_sounds.enableMusic(value)
end)
end
Settings.set(key, value)
options[key] = value
@@ -132,4 +137,3 @@ end
function Options.getOption(key)
return options[key]
end