A utility node that allows for EventListener’s to be added as a node to a class, delegating memory handling onto cocos. This is helpful when there is a need to tie a listener onto a node.
Class EventListenerNode
#include <Geode/utils/cocos.hpp>classEventListenerNode:publiccocos2d::CCNode{ ... }
Filter
The event filter this listener uses. See `EventListener` for more information.
Examples2
this->addChild(EventListenerNode<MyFilter>::create([&](){
// handling code here
}));Public static methods2
staticgeode::EventListenerNode*create(geode::ListenerHandle&&handle)
No description provided
template<class Event,class Callback>staticgeode::EventListenerNode*create(Eventevent,Callback&&callback,intpriority)
No description provided
Public member functions0
Fields0
Protected member functions0
Protected fields1
geode::ListenerHandlem_handle;
No description provided