In the process I made a few bugfixes:
car
handlers for each pane are now siloed from each other. When
you navigate away they go away, when you navigate back they're still
active. Very nice.NV4WC3K4KQMF4NSGAKJG7JMN3WNDWPIA7NVYVZUOWFUKZ4562UEQC
'-- for example, love.draw, love.update, love.keypressed, etc.',
"-- You can't define those directly because Carousel Shell needs to define them, but you can define your own under car.*,",
'-- for example, love.draw, love.update, etc.',
"-- You can't define those directly because Carousel Shell needs to define them for its UI, but you can define your own under car.*,",
'end',
},
{
'-- For interactivity, LÖVE provides functions like love.keypressed, love.mousepressed, etc.',
'-- As before, define the corresponding car.keypressed, car.mousepressed, etc.',
"-- A pane's interactive events only activate when the editor is hidden using the 'hide' button above.",
"-- Try running this example and then pressing and holding the mouse and pressing and releasing keys.",
'-- Then try hiding the editor and again pressing and holding the mouse and pressing and releasing keys',
'X, Y, dX = 100, 0, 10',
"Log = ''",
'',
'function car.draw()',
' love.graphics.line(X,Y, X,Y+300)',
' love.graphics.print(Log, 50,50)',
'end',
'',
'function car.update(dt)',
' if X > 500 then dX = -dX end',
' if X < 100 then dX = -dX end',
' X = X+dX',