wire up new-style car.* handlers

This commit is contained in:
Kartik K. Agaram 2023-12-26 09:28:16 -08:00
parent 5536d762cb
commit 499fdf17dd
3 changed files with 24 additions and 0 deletions

8
0155-on.touch_press Normal file
View File

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

8
0156-on.touch_release Normal file
View File

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

8
0157-on.touch_move Normal file
View File

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