Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Majicpanda on January 22, 2014, 11:01:29 PM

Title: Don't think I can convert project to new NGUI
Post by: Majicpanda on January 22, 2014, 11:01:29 PM
Our game uses a size 8 pixel font and a UI size of 144 to create a pixel perfect size UI to meet our tk2d size pixel perfect world.  Upon trying to update to the new NGUI I ran into a major problem with the font.  The old system allowed you to change the "font size" from 5 to 6 for example which gave me the size I wanted in the inspector transform.

The new system seems to "snap" my font size in really large increments when I use the height option.  Not sure why this is occuring, but I imagine it's because of the tiny font size I use?  On screen changing the height by 1 is just way too big of a change in font size, so I have no way to correctly size the font.
Title: Re: Don't think I can convert project to new NGUI
Post by: ArenMook on January 23, 2014, 05:54:42 AM
NGUI 3 snaps to pixels when moving widgets, and since your UI size is 144 it means you only have 144 pixels to work with. Why are you trying to match tk2d? Use a different camera for NGUI and you won't be running into such problems.
Title: Re: Don't think I can convert project to new NGUI
Post by: Nicki on January 23, 2014, 09:36:49 AM
"144 pixels ought to be enough for anybody" - Bill Gates.
Title: Re: Don't think I can convert project to new NGUI
Post by: Majicpanda on January 23, 2014, 02:01:41 PM
I'm not trying to use the same camera as tk2d, I'm simply matching the size of the pixels on screen to it so that the games pixel perfect nature appears parallel.  I could double the res for uiroot to 288 but then the "square" pixels for all the game would be half the size to that of the game.. if that makes any sense.

If that's our only option we may end up going with it, it would allow for more detail in our UI anyway.
Title: Re: Don't think I can convert project to new NGUI
Post by: ArenMook on January 24, 2014, 09:25:05 AM
I wouldn't try to match it at all. UI is supposed to be crisp, and for it to be crisp it should ideally be pixel-perfect. You say yourself you want it to be pixel perfect, but forcing it to be 144 pixels tall is anything but, unless your actual device is only 144 pixels tall, which I highly doubt.