shield script from touch events when showing editor

This commit is contained in:
Kartik K. Agaram 2024-03-22 17:29:29 -07:00
parent a7fb944976
commit e848a890ef
3 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,5 @@
on.touch_press = function(id, x,y, dx,dy, pressure)
if Show_code then return end
if car.touchpressed then
call_protected(car.touchpressed, id, x,y, dx,dy, pressure)
end

View File

@ -1,4 +1,5 @@
on.touch_release = function(id, x,y, dx,dy, pressure)
if Show_code then return end
if car.touchreleased then
call_protected(car.touchreleased, id, x,y, dx,dy, pressure)
end

View File

@ -1,4 +1,5 @@
on.touch_move = function(id, x,y, dx,dy, pressure)
if Show_code then return end
if car.touchmoved then
call_protected(car.touchmoved, id, x,y, dx,dy, pressure)
end