docs update

Updated some docs stuff
This commit is contained in:
Robert Jelic
2022-10-09 12:05:30 +02:00
parent 44402b1d26
commit 1d3e2018ef
13 changed files with 228 additions and 7 deletions

View File

@@ -2,10 +2,20 @@
## onEvent
Every event the computer receives, from the bulit-in event "api", will get passed into basalt.onEvent, except for all mouse events, the key events (key and key_up), char and monitor_touch.
This is the top-level method to intercept an event before sending it to the object event handlers. If you use return false, the event is not passed to the event handlers.
### Parameters
1. `function` The function which should be called
### Usage
TODO
```lua
local basalt = require("basalt")
basalt.onEvent(function(event)
if(event=="terminate")then
return false
end
end)
```