File util/chain.lua
loveui is a love2d library to provide resuable GUI widgets to love2d developers.
Functions
chain:__call (...) | A chain of functions. |
chain:add (...) | Add a function to the end of the chain. |
chain:remove (fn, ...) | Remove functions from a chain |
Functions
- chain:__call (...)
-
A chain of functions. When called, each function in the chain will be called with the arguments. One can use table.insert and table.remove as normal to add or remove functions from the chain.
Parameters
- ...: The argument to each function.
- chain:add (...)
-
Add a function to the end of the chain.
Parameters
- ...: Functions to be added.
- chain:remove (fn, ...)
-
Remove functions from a chain
Parameters
- fn: A function to remove from the chain
- ...: Other functions to remove from the chain