mirror of
https://github.com/vrld/hump.git
synced 2024-10-15 09:04:18 +00:00
Fetch event callbacks from love instead of hardcoding it
This commit is contained in:
parent
c06e8e6ee8
commit
5c9d51d356
@ -67,13 +67,11 @@ function GS.current()
|
||||
return stack[#stack]
|
||||
end
|
||||
|
||||
local all_callbacks = {
|
||||
'draw', 'errhand', 'focus', 'keypressed', 'keyreleased', 'mousefocus',
|
||||
'mousemoved', 'mousepressed', 'mousereleased', 'quit', 'resize',
|
||||
'textinput', 'threaderror', 'update', 'visible', 'gamepadaxis',
|
||||
'gamepadpressed', 'gamepadreleased', 'joystickadded', 'joystickaxis',
|
||||
'joystickhat', 'joystickpressed', 'joystickreleased', 'joystickremoved'
|
||||
}
|
||||
-- fetch event callbacks from love.handlers
|
||||
local all_callbacks = { 'draw', 'errhand', 'update' }
|
||||
for k in pairs(love.handlers) do
|
||||
all_callbacks[#all_callbacks+1] = k
|
||||
end
|
||||
|
||||
function GS.registerEvents(callbacks)
|
||||
local registry = {}
|
||||
|
Loading…
Reference in New Issue
Block a user