A lightweight programming environment for desktop and mobile devices
settings_button = function(x)
	return right_justified_button('settings', x, Menu_top+5,
		function()
			if Show_menu == 'settings' then
				Show_menu = nil
				-- On mobile devices, we can't depend on on.save_settings() triggering on quit
				love.filesystem.write('config', json.encode(settings()))
			else
				Show_menu = 'settings'
			end
		end)
end