diff options
Diffstat (limited to 'util.lua')
| -rw-r--r-- | util.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,9 @@ update_hooks = {} +function AddUpdateHook(f) + update_hooks[#update_hooks + 1] = f +end + -- https://pico-8.fandom.com/wiki/Qsort function qsort(a, c, l, r) c, l, r = c or function(a, b) return a < b end, l or 1, r or #a @@ -99,7 +103,7 @@ function _update_button_states(_dt) end end end -update_hooks[1] = _update_button_states +AddUpdateHook(_update_button_states) function button_just_pressed(id) return _button_states[id] == "just_pressed" end
\ No newline at end of file |
