diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-12-23 17:16:19 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-12-23 18:52:28 -0800 |
commit | 2b3e09ca0fadcaaeac8d563aae1baeb7e7da3754 (patch) | |
tree | fa1d6ef4e18c53c9d4400917ade89e063a30a8c3 /main.lua | |
parent | e2e3aea2b1b9504bf849d1ab3ca9eb16544b651d (diff) | |
download | text.love-2b3e09ca0fadcaaeac8d563aae1baeb7e7da3754.tar.gz |
make love event names consistent
I want the words to be easy to read, and to use a consistent tense. update and focus seem more timeless; let's make everything like those.
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/main.lua b/main.lua index 7c3a482..c078f10 100644 --- a/main.lua +++ b/main.lua @@ -109,9 +109,9 @@ end function App.filedropped(file) if Current_app == 'run' then - if run.filedropped then run.filedropped(file) end + if run.file_drop then run.file_drop(file) end elseif Current_app == 'source' then - if source.filedropped then source.filedropped(file) end + if source.file_drop then source.file_drop(file) end else assert(false, 'unknown app "'..Current_app..'"') end @@ -156,7 +156,7 @@ function App.update(dt) end end -function App.keychord_pressed(chord, key) +function App.keychord_press(chord, key) -- ignore events for some time after window in focus (mostly alt-tab) if Current_time < Last_focus_time + 0.01 then return @@ -186,9 +186,9 @@ function App.keychord_pressed(chord, key) return end if Current_app == 'run' then - if run.keychord_pressed then run.keychord_pressed(chord, key) end + if run.keychord_press then run.keychord_press(chord, key) end elseif Current_app == 'source' then - if source.keychord_pressed then source.keychord_pressed(chord, key) end + if source.keychord_press then source.keychord_press(chord, key) end else assert(false, 'unknown app "'..Current_app..'"') end @@ -201,9 +201,9 @@ function App.textinput(t) end -- if Current_app == 'run' then - if run.textinput then run.textinput(t) end + if run.text_input then run.text_input(t) end elseif Current_app == 'source' then - if source.textinput then source.textinput(t) end + if source.text_input then source.text_input(t) end else assert(false, 'unknown app "'..Current_app..'"') end @@ -216,9 +216,9 @@ function App.keyreleased(chord, key) end -- if Current_app == 'run' then - if run.key_released then run.key_released(chord, key) end + if run.key_release then run.key_release(chord, key) end elseif Current_app == 'source' then - if source.key_released then source.key_released(chord, key) end + if source.key_release then source.key_release(chord, key) end else assert(false, 'unknown app "'..Current_app..'"') end @@ -237,9 +237,9 @@ end function App.mousereleased(x,y, mouse_button) if Current_app == 'run' then - if run.mouse_released then run.mouse_released(x,y, mouse_button) end + if run.mouse_release then run.mouse_release(x,y, mouse_button) end elseif Current_app == 'source' then - if source.mouse_released then source.mouse_released(x,y, mouse_button) end + if source.mouse_release then source.mouse_release(x,y, mouse_button) end else assert(false, 'unknown app "'..Current_app..'"') end |