Using CCNodes to find positions

Hi.

I’ve been working a lot with CocosBuilder in my job, but in my home, as I don’t have a MAC Osx, I’m trying to use CocosStudio.

The main poblem I’m facing right now is that with CocosBuilder, I was able to put CCNodes all over the place to use them later in the code as a reference for the position. I take those nodes and add as child other nodes I created in code.

But now… there are no nodes. The most similar thing is planes. Is it ok to use planes just for positioning?

How did you solve this issue? Thanks

What are you trying to make? Armatures? Scenes? Layouts?

When you are loading in a json definition from CocoStudio the nodes are already positioned, no need to make some anchors.
You are able to position the nodes in absolute or relative coordinates or even “magnetized” to some parent nodes.

Do you want to have some anchor nodes, which are not visible?
Yes, you can use a panel. A panel is just a parent node/layout node, which can be made “invisible” by setting the FillColor to NoColor.

Btw.: OS X is free and you can install it on your Windows PC or even in a VM(if you want to use CocosBuilder).

I just want to have some invisible CCNodes to add childs in them in code. This is just for positioning.

I can’t have OSX in my AMD.

Yea, I feel you man, CCNode support is in the next version :slight_smile:

Just use a node and add the childs to them. A raw node is not visible, as it has no textures or anything.

Really? Are you going to add the posibility to add CCNodes in the UI Editor? That would be great.

That is what I want to do, but through the UI Editor, as I would like to position visually where is going to be the CCNode. I don’t want to do it in code.

You said you want to add them in code.

But now you say you don’t

As I said earlier. If you want to achieve it in the UI use a panel. A panel is just a parent node/layout node, which can be made “invisible” by setting the FillColor to NoColor.

I want to create a positioned CCNode in the UI Editor, to use it in code to add to it childs. I don’t want to create the CCNode in code as I will have to calculate its position.

Using layouts is what I’m doing right now, but it doesn’t feel right as it has lots of things I don’t need… CocosBuilder was more dynamic than this UI Editor.

Now we are talking :smile:
As there is no CCNode support in CocoStudio you have to use panel.

A panel is for grouping childs. Exactly what you want. It may not feel right, cause panel can do a lot more things, but as of now, it is the only solution to what you want to achieve,