2023-11-26 17:49:54 +00:00
|
|
|
settings_button = function(x)
|
2023-11-26 17:53:09 +00:00
|
|
|
return right_justified_button('settings', x, Menu_top+5,
|
2023-11-26 07:03:20 +00:00
|
|
|
function()
|
2023-12-05 06:09:47 +00:00
|
|
|
if Show_menu == 'settings' then
|
|
|
|
Show_menu = nil
|
2023-11-26 02:29:32 +00:00
|
|
|
-- On mobile devices, we can't depend on on.save_settings() triggering on quit
|
|
|
|
love.filesystem.write('config', json.encode(settings()))
|
2023-12-05 06:09:47 +00:00
|
|
|
else
|
|
|
|
Show_menu = 'settings'
|
2023-11-26 02:29:32 +00:00
|
|
|
end
|
2023-11-26 07:03:20 +00:00
|
|
|
end)
|
2023-12-05 06:09:47 +00:00
|
|
|
end
|