diff options
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main.lua b/main.lua index 34ece94..7c2e34c 100644 --- a/main.lua +++ b/main.lua @@ -207,16 +207,16 @@ function App.textinput(t) end end -function App.keyreleased(chord, key) +function App.keyreleased(key, scancode) -- ignore events for some time after window in focus (mostly alt-tab) if Current_time < Last_focus_time + 0.01 then return end -- if Current_app == 'run' then - if run.key_release then run.key_release(chord, key) end + if run.key_release then run.key_release(key, scancode) end elseif Current_app == 'source' then - if source.key_release then source.key_release(chord, key) end + if source.key_release then source.key_release(key, scancode) end else assert(false, 'unknown app "'..Current_app..'"') end @@ -225,9 +225,9 @@ end function App.mousepressed(x,y, mouse_button) --? print('mouse press', x,y) if Current_app == 'run' then - if run.mouse_pressed then run.mouse_press(x,y, mouse_button) end + if run.mouse_press then run.mouse_press(x,y, mouse_button) end elseif Current_app == 'source' then - if source.mouse_pressed then source.mouse_press(x,y, mouse_button) end + if source.mouse_press then source.mouse_press(x,y, mouse_button) end else assert(false, 'unknown app "'..Current_app..'"') end |