Is there a graphical tool for Mac to help position CCNode objects on a layer?

If my designer gives me a 960x640px image of how the screen should look, as well as all the individual elements in the form of images or text, is there a way to put the images and text on the iPhone / iPad screen without doing it manually using code? The way I'm doing it now is a series of trial and error trying to guess the position of each element.

By the way, the types of layouts I'm trying to do are simple static layouts for things like the Menu and Best Results lists, etc.

+4
source share
4 answers

You should try one of the editing tools: LevelHelper , CocoShop and CocosBuilder . The problem will be in the output format, make sure that not only the editing part works with your specifications, but you can actually use only a piece of code that needs to be connected to your code.

+1
source

Do you have image editing software like Photoshop or GIMP? How about opening a 960x640px image with any such software, and then hover over the center of each element for its coordinates and then finally pump these values ​​into your code?

In my opinion, this is at least better and faster than trial and error :)

+1
source

If you want to measure the position of graphic elements. You can try ads called xscope. A version of the trail can be downloaded from the official website. This is the best tool I've ever seen for measuring distance, color (for example, it can copy color measured directly in the [UIColor ...] format), etc. If you want something free, I would like to recommend markman, which is Chinese software, it is built on black air. All elements / buttons are graphic, so you do not need to read Chinese to use it.

+1
source

You can try using an open source editor and write your exporter. For example, I use blender as a level editor for the game I'm working on. It has a nice python API that can be used to export all the information you need.

0
source

Source: https://habr.com/ru/post/1394169/


All Articles