Need your feedbacks of the new documents

[LUA]
.pkg files are very important for lua developers. But till now, there are little comments in pkg files. Please do not remove comments when fork from C++.h files, just keep comments there.
For some functions bind manual, add stub into pkg files will be more welcome. To avoid pkg build problem, prefix as “// some manual binding function …” may be need.
Thanks the great cocos team. :slight_smile:

I’m trying to do some editing of the Event Mechanism document. Most of it I understand, but there are a few items that I can’t figure out.

  1. When Dealing with event logical, according to each kind of situations to solve the logics when touched(such as recognize click area, set clicked element as different transparency) to display the click effect.
  1. As listener1->setSwallowTouches(true) is setted and some decisions has been made in onTouchBegan to get the return value, whether the display order of the touch event should pass back can be solved.

I’m afraid I don’t understand these sentences at all. Any clarification would be helpful.

Thanks!

miao dadao wrote:

[LUA]
*.pkg files are very important for lua developers. But till now, there are little comments in pkg files. Please do not remove comments when fork from C*+ *.h files, just keep comments there.
For some functions bind manual, add stub into pkg files will be more welcome. To avoid pkg build problem, prefix as “// some manual binding function …” may be need.
Thanks the great cocos team. :slight_smile:

We have documents for lua bindings too http://cocos2d-x.org/wiki/Reference… As you can see, there are c*+/lua/js version.

bunny hero wrote:

I’m trying to do some editing of the Event Mechanism document. Most of it I understand, but there are a few items that I can’t figure out.
>
bq. 2. When Dealing with event logical, according to each kind of situations to solve the logics when touched(such as recognize click area, set clicked element as different transparency) to display the click effect.
>
bq. 3. As listener1->setSwallowTouches(true) is setted and some decisions has been made in onTouchBegan to get the return value, whether the display order of the touch event should pass back can be solved.
>
I’m afraid I don’t understand these sentences at all. Any clarification would be helpful.
>
Thanks!

You may setup the logic for different kinds of event.
For example, changing the transparency of particular Node by checking the clicked area.

Since the statement “listener1->setSwallowTouches(true)” has been defined, the system continues to process based on the return value of onTouchBegan.
If onTouchBegan returns true value, the system stops and return.
If onTouchBegan returns false value, the system continues on checking remaining Nodes.

Minggo Zhang wrote:

miao dadao wrote:
> [LUA]
> *.pkg files are very important for lua developers. But till now, there are little comments in pkg files. Please do not remove comments when fork from C*+ *.h files, just keep comments there.
> For some functions bind manual, add stub into pkg files will be more welcome. To avoid pkg build problem, prefix as “// some manual binding function …” may be need.
> Thanks the great cocos team. :slight_smile:
>
We have documents for lua bindings too http://cocos2d-x.org/wiki/Reference… As you can see, there are c*+/lua/js version.

I’m very glad to see the new lua document. But I found some minor problems about it.
# Language selection can’t kept when page changing.
# Some lua document are not exactly. Such as Websocket::send methods shouldn’t just named to send in lua, but sendTextMsg and sendBinaryMsg.

Thanks.

Hi,
Will you put the reference into download packages? Because if you upgrade the version, then I cannot find the old one.

you cant go wrong with more documentation

thx for the effort pps

miao dadao wrote:

[LUA]
.pkg files are very important for lua developers. But till now, there are little comments in pkg files. Please do not remove comments when fork from C++.h files, just keep comments there.
For some functions bind manual, add stub into pkg files will be more welcome. To avoid pkg build problem, prefix as “// some manual binding function …” may be need.
Thanks the great cocos team. :slight_smile:

.pkg files have been removed since v3.0. We’re using bindings-generator to automatically generate lua binding codes. You only need to create .ini config file like this https://github.com/cocos2d/cocos2d-x/blob/develop/tools/tolua/cocos2dx_gui.ini, then use bindings-generator to create a beast like this for you automatically. But until now, we still lack of good documents on how to use bindings-generator :frowning: