new car.quit callback for user scripts

This is particularly important for scripts that use my editor widget and
need to invoke edit.quit. But it also seems like a good idea anyway.
This commit is contained in:
Kartik K. Agaram 2023-12-19 10:43:54 -08:00
parent 4ddeb112aa
commit ff5570d028
1 changed files with 4 additions and 1 deletions

View File

@ -1,9 +1,12 @@
stop_button = function(x, y)
styled_button('stop', x,y,
function()
if car.quit then
call_protected(car.quit)
end
Show_menu = nil
clear_handlers()
end)
local w = App.width('stop')+10
return x+w+10, y
end
end