mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Added love.event.addListener and removeListener.
addListener takes a function, and names of events that will trigger the function when they're processed inside love.event.poll or love.event.wait. When the given listener function is called, the name of the event as well as all of the event's arguments are passed to the function. If addListener is called multiple times with the same function and events, it will not add the function more than once. removeListener takes a function and removes it from all events it was previously added to.
This commit is contained in:
@@ -49,6 +49,8 @@ public:
|
||||
int toLua(lua_State *L);
|
||||
static Message *fromLua(lua_State *L, int n);
|
||||
|
||||
const std::string &getName() const { return name; }
|
||||
|
||||
private:
|
||||
|
||||
std::string name;
|
||||
|
||||
Reference in New Issue
Block a user