Files
Basalt/docs/objects/Basalt/onEvent.md
Robert Jelic 1d3e2018ef docs update
Updated some docs stuff
2022-10-09 12:05:30 +02:00

413 B

Basalt

onEvent

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

local basalt = require("basalt")

basalt.onEvent(function(event)
    if(event=="terminate")then
        return false
    end
end)