fix options

This commit is contained in:
Eduardo Bart 2012-01-07 19:19:40 -02:00
parent ef0c625c41
commit 196a95f4c0
1 changed files with 5 additions and 5 deletions

View File

@ -4,11 +4,6 @@ local optionsWindow
local optionsButton local optionsButton
function Options.init() function Options.init()
optionsWindow = displayUI('options.otui')
optionsWindow:setVisible(false)
optionsButton = TopMenu.addButton('settingsButton', 'Options (Ctrl+O)', '/core_styles/icons/settings.png', Options.toggle)
Hotkeys.bind('Ctrl+O', Options.toggle)
-- load settings -- load settings
local booleanOptions = { vsync = true, local booleanOptions = { vsync = true,
showfps = true, showfps = true,
@ -19,6 +14,11 @@ function Options.init()
Settings.setDefault(k, v) Settings.setDefault(k, v)
Options.changeOption(k, Settings.getBoolean(k)) Options.changeOption(k, Settings.getBoolean(k))
end end
optionsWindow = displayUI('options.otui')
optionsWindow:setVisible(false)
optionsButton = TopMenu.addButton('settingsButton', 'Options (Ctrl+O)', '/core_styles/icons/settings.png', Options.toggle)
Hotkeys.bind('Ctrl+O', Options.toggle)
end end
function Options.terminate() function Options.terminate()