Widgets for pixel perfect GUI

For gui widgets like in Cocos Creator or Unity NGUI are very useful for multiresolution support. Existing system do not allow(or i didn’t get it how) to make pixel perfect gui.

1 Like

What you want is possible. Start with a resolution script like this http://github.com/britzl/publicexamples/tree/master/examples/fixed_aspect_ratio

There are various strategies to take with building your GUI. Can you share how far you got into it, screenshots of where things look wrong?

1 Like

I could explain the widged system, but its easier to look at suggested engines.
Startup resloution:

After resize:

I want:

1 Like

You want UI which floats to a corner of the screen and is not scaled as the window is resized - to remain a static size in pixels relative the monitor as the window is resized?

yes it is one of the cases

Easiest way to do this probably would be to have the node’s adjust mode to fit and then scale it based on the difference in size of your base screen size set in your project, and the size of the window currently (see the previous render script sample for ideas on this).

I’m sure there is a way, but this is feature request thread, right?

1 Like

Yes, and I agree that what you want would be useful to have more accessible to do. Could to link to the comparable documentation in the other editors/engines for this kind of UI widget element setup?

It would be worth testing to see if you can get it working with Defold as is and share your results. I’ll add it myself to my own todo for later.

http://cocos2d-x.org/docs/editors_and_tools/creator-chapters/ui/widget-align/