cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.22k stars 7.05k forks source link

Schedule::dispatchCustomEvent() is skipped in lua-binding #12733

Open minggo opened 9 years ago

minggo commented 9 years ago

As you can see here, Schedule::dispatchCustomEvent() is skipped.

Is there any reason to skip this function?

pandamicro commented 9 years ago

dispatchCustomEvent is done in pure script for JS: https://github.com/cocos2d/cocos2d-x/blob/v3/cocos/scripting/js-bindings/script/jsb_cocos2d.js#L1649

I think it can be done equally in Lua in the same way

pandamicro commented 9 years ago

Ok, I see, the reason this API have been skipped is that void * can not be converted in auto bindings, so I suggest to bind this function manually. https://github.com/cocos2d/cocos2d-x/pull/12788/files

PR reverted: https://github.com/cocos2d/cocos2d-x/pull/12791

minggo commented 9 years ago

Yep, there is an optional parameter that accepts void*.

v1993 commented 7 years ago

Any news?