mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 11:34:54 +02:00
Save miniwindows states
This commit is contained in:
@@ -34,3 +34,7 @@ Panel
|
||||
OptionCheckBox
|
||||
id: enableMusic
|
||||
!text: tr('Enable music')
|
||||
|
||||
OptionCheckBox
|
||||
id: showLeftPanel
|
||||
!text: tr('Show left panel')
|
||||
|
@@ -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
|
||||
|
@@ -17,7 +17,7 @@ OptionCheckBox < CheckBox
|
||||
MainWindow
|
||||
id: optionsWindow
|
||||
!text: tr('Options')
|
||||
size: 350 240
|
||||
size: 350 280
|
||||
|
||||
@onEnter: Options.hide()
|
||||
@onEscape: Options.hide()
|
||||
|
Reference in New Issue
Block a user