Sounds good,

Can IDE (xcode, VS) recognize void(EventMouse* event) and show user hints ? 

-Nite

On Oct 31, 2013, at 10:40 PM, James Chen <notifications@github.com> wrote:

> In cocos/2d/CCEventListenerMouse.h:
> 
> > +
> > +class Event;
> > +
> > +class EventListenerMouse : public EventListener
> > +{
> > +public:
> > +    static EventListenerMouse* create();
> > +
> > +    /// Overrides
> > +    virtual EventListenerMouse* clone() override;
> > +    virtual bool checkAvailable() override;
> > +
> > +    std::function<void(Event* event)> onMouseDown;
> > +    std::function<void(Event* event)> onMouseUp;
> > +    std::function<void(Event* event)> onMouseMove;
> > +    std::function<void(Event* event)> onMouseScroll;
> What do you think of defining the callback to std::function<void(EventMouse* event)> to avoid cast?
> 
> —
> Reply to this email directly or view it on GitHub.
>