Save miniwindows states

This commit is contained in:
Henrique Santiago
2012-06-21 16:31:22 -03:00
parent 96c363d997
commit a7c17cec2e
22 changed files with 317 additions and 60 deletions

View File

@@ -34,3 +34,7 @@ Panel
OptionCheckBox
id: enableMusic
!text: tr('Enable music')
OptionCheckBox
id: showLeftPanel
!text: tr('Show left panel')

View File

@@ -14,7 +14,8 @@ local options = { vsync = false,
showLevelsInConsole = true,
showPrivateMessagesInConsole = false,
showPrivateMessagesOnScreen = true,
enableMusic = true }
enableMusic = true,
showLeftPanel = false }
local generalPanel
local graphicsPanel
@@ -129,6 +130,10 @@ function Options.setOption(key, value)
addEvent(function()
g_sounds.enableMusic(value)
end)
elseif key == 'showLeftPanel' then
addEvent(function()
GameInterface.getLeftPanel():setOn(value)
end)
end
Settings.set(key, value)
options[key] = value

View File

@@ -17,7 +17,7 @@ OptionCheckBox < CheckBox
MainWindow
id: optionsWindow
!text: tr('Options')
size: 350 240
size: 350 280
@onEnter: Options.hide()
@onEscape: Options.hide()