so on the love.event page https://love2d.org/wiki/love.event it says
It is possible to define new events by appending the table love.handlers. Such functions can be invoked as usual, via love.event.push using the table index as an argument.
i thought maybe this was a table i could access using table.insert(love.handlers,) or something along these lines. I'm having trouble finding any more documentation, or comments, or any other information regarding it.
I'm trying to make custom events that I can push when a button has been clicked (think gui not keyboard).
hopefully I've worded this clearly enough.
thanks
custom events
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: custom events
It's not indexed numerically, because then how would it associate handlers to events? Instead it's indexed by the event name. So love.handlers.cake handles the event named "cake".
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 3 guests