2023-11-21 06:23:09 +00:00
|
|
|
settings_button = function(x, w)
|
2023-11-26 07:03:20 +00:00
|
|
|
styled_button('settings', x, Menu_top+5,
|
|
|
|
function()
|
2023-11-21 10:19:56 +00:00
|
|
|
Show_settings = not Show_settings
|
2023-11-25 17:10:05 +00:00
|
|
|
if Show_settings then Show_overflow = false end
|
2023-11-26 02:29:32 +00:00
|
|
|
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
|
2023-11-26 07:03:20 +00:00
|
|
|
end)
|
2023-11-21 06:23:09 +00:00
|
|
|
return x+w+10
|
|
|
|
end
|