a few more renames

This commit is contained in:
Kartik K. Agaram 2022-12-23 20:30:35 -08:00
parent 45032ebbbe
commit 34abf6c624
3 changed files with 11 additions and 11 deletions

14
0001-on
View File

@ -4,15 +4,15 @@ on = {
-- supported handlers:
-- on.initialize (see love.load)
-- on.quit
-- on.code_changed (runs after every time the driver sends a new definition)
-- on.code_change (runs after every time the driver sends a new definition)
-- on.draw
-- on.update
-- on.resize
-- on.filedropped
-- on.file_drop
-- on.focus
-- on.mouse_pressed (see love.mousepressed)
-- on.mouse_released (see love.mousereleased)
-- on.keychord_pressed (see keychord.lua in this repo)
-- on.textinput
-- on.key_released (see love.keyreleased)
-- on.mouse_press (see love.mousepressed)
-- on.mouse_release (see love.mousereleased)
-- on.keychord_press (see keychord.lua in this repo)
-- on.text_input (see love.textinput)
-- on.key_release (see love.keyreleased)
}

View File

@ -148,7 +148,7 @@ function live.update(dt)
local buf = live.receive()
if buf then
live.run(buf)
if on.code_changed then on.code_changed() end
if on.code_change then on.code_change() end
end
Live.Previous_read = Current_time
end

View File

@ -80,7 +80,7 @@ function App.resize(w, h)
end
function App.filedropped(file)
if on.filedropped then on.filedropped() end
if on.file_drop then on.file_drop() end
end
function App.draw()
@ -105,12 +105,12 @@ end
function App.mousepressed(x,y, mouse_button)
Cursor_time = 0 -- ensure cursor is visible immediately after it moves
if on.mouse_pressed then on.mouse_pressed(x,y, mouse_button) end
if on.mouse_press then on.mouse_press(x,y, mouse_button) end
end
function App.mousereleased(x,y, mouse_button)
Cursor_time = 0 -- ensure cursor is visible immediately after it moves
if on.mouse_released then on.mouse_released(x,y, mouse_button) end
if on.mouse_release then on.mouse_release(x,y, mouse_button) end
end
function App.focus(in_focus)