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:
parent
4ddeb112aa
commit
ff5570d028
|
@ -1,9 +1,12 @@
|
||||||
stop_button = function(x, y)
|
stop_button = function(x, y)
|
||||||
styled_button('stop', x,y,
|
styled_button('stop', x,y,
|
||||||
function()
|
function()
|
||||||
|
if car.quit then
|
||||||
|
call_protected(car.quit)
|
||||||
|
end
|
||||||
Show_menu = nil
|
Show_menu = nil
|
||||||
clear_handlers()
|
clear_handlers()
|
||||||
end)
|
end)
|
||||||
local w = App.width('stop')+10
|
local w = App.width('stop')+10
|
||||||
return x+w+10, y
|
return x+w+10, y
|
||||||
end
|
end
|
Loading…
Reference in New Issue