2023-11-22 20:38:16 +00:00
|
|
|
delete_pane_button = function(x, y, r)
|
2023-11-26 05:11:24 +00:00
|
|
|
return overflowable_button('delete', x, y, r,
|
|
|
|
function()
|
2023-12-05 06:09:47 +00:00
|
|
|
Show_menu = nil
|
2023-11-23 05:22:34 +00:00
|
|
|
if Current_pane.example_name then
|
|
|
|
Deleted_example_panes[Current_pane.example_name] = true
|
|
|
|
end
|
2023-11-21 06:23:09 +00:00
|
|
|
table.remove(Panes, Current_pane_index)
|
|
|
|
if #Panes == 0 then
|
|
|
|
table.insert(Panes, new_pane())
|
|
|
|
end
|
|
|
|
if Current_pane_index > #Panes then
|
|
|
|
Current_pane_index = Current_pane_index-1
|
|
|
|
end
|
|
|
|
Current_pane = Panes[Current_pane_index]
|
2023-12-05 19:56:36 +00:00
|
|
|
car = Current_pane.car or {}
|
2023-12-09 06:12:16 +00:00
|
|
|
-- Don't load the deleted pane in future sessions.
|
|
|
|
-- On mobile devices, we can't depend on on.save_settings() triggering on quit.
|
|
|
|
love.filesystem.write('config', json.encode(settings()))
|
2023-12-02 03:59:23 +00:00
|
|
|
end,
|
|
|
|
--[[final button]] true)
|
2023-12-05 19:56:36 +00:00
|
|
|
end
|