sokoban.love/0072-settings_button

11 lines
379 B
Plaintext

settings_button = function(x)
return right_justified_button('settings', x, Menu_top+5,
function()
Show_settings = not Show_settings
if Show_settings then Show_overflow = false end
if not Show_settings then
-- On mobile devices, we can't depend on on.save_settings() triggering on quit
love.filesystem.write('config', json.encode(settings()))
end
end)
end