pothi.love/0001-on

32 lines
1.5 KiB
Plaintext
Raw Normal View History

on = {
-- for top-level handlers (see https://love2d.org/wiki/Main_Page for love.* variants)
-- supported handlers:
-- on.initialize (see love.load)
-- One major note:
-- driver.love gives you zero control over the order definitions are
-- loaded in. To avoid issues, never initialize one global based on the
-- value of another. Perform such initializations inside a function like
-- on.initialize.
-- on.quit
2023-01-07 21:49:20 +00:00
-- on.code_change (runs after executing code received from the driver)
2023-01-22 06:51:16 +00:00
-- on.code_submit (runs after submitting code to the app; only applicable to the driver, obviously)
-- on.draw (avoid modifying global state here)
-- on.update
-- on.resize
2023-04-21 07:39:36 +01:00
-- on.file_drop (see love.filedropped)
-- on.focus
2022-12-24 04:30:35 +00:00
-- on.mouse_press (see love.mousepressed)
-- on.mouse_release (see love.mousereleased)
2023-12-26 16:28:23 +00:00
-- on.mouse_move (see love.mousemoved)
2023-03-24 04:48:42 +00:00
-- on.mouse_wheel_move (see love.wheelmoved)
2022-12-24 04:30:35 +00:00
-- on.keychord_press (see keychord.lua in this repo)
-- on.text_input (see love.textinput)
-- on.key_release (see love.keyreleased)
2023-01-02 02:22:52 +00:00
-- on.load_settings(settings) -- fan out settings table into any other global state
-- settings might be nil if there are no saved settings
2023-04-08 02:17:58 +01:00
-- runs before on.initialize
2023-01-02 02:22:52 +00:00
-- on.save_settings() -- return a settings table which will be persisted to disk across restart
2023-04-08 02:17:58 +01:00
-- runs after on.quit
}