Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: MegaX on June 24, 2014, 10:08:53 PM

Title: FixedSize and Screen Resolutions
Post by: MegaX on June 24, 2014, 10:08:53 PM
Hi,

I have searched around and found no solution to my problem.
So I have my UIRoot set to FixedSize with manual height of 1080. UILabels look nice and crisp in 1080p (native) resolution. However, when I play the game in 1366x768, UILabels become blurry.
How would you go about making UILabels crisp across different resolutions?

Thanks.
Title: Re: FixedSize and Screen Resolutions
Post by: ArenMook on June 25, 2014, 07:21:54 AM
You're shrinking them. Fixed Size means everything remains the same size relative to the height of the screen. Only PixelPerfect will keep them crisp everywhere.
Title: Re: FixedSize and Screen Resolutions
Post by: MegaX on June 25, 2014, 10:57:31 PM
Right. I do want to keep UI elements the same size relative to height.
Is there a way to accomplish both that and keeping the text crisp?
Title: Re: FixedSize and Screen Resolutions
Post by: ArenMook on June 26, 2014, 11:03:00 AM
That's not physically possible. Shrunk UI = pixels don't align. Can't get it to be crisp this way.
Title: Re: FixedSize and Screen Resolutions
Post by: MegaX on June 26, 2014, 11:18:59 PM
I see, thanks for the help.
So in order to achieve pixel-perfect UI for various resolutions, is it a good approach to resize UI elements and change the font size in code based on the chosen resolution?
Or another possibility is to have one atlas for each resolution and switch the atlas to use during runtime based on the resolution, would that work?
Title: Re: FixedSize and Screen Resolutions
Post by: ArenMook on June 27, 2014, 01:02:28 PM
To achieve pixel perfect UIs at different resolutions you have to use the PixelPerfect setting, or different atlases. For example, HD atlas with pixel size of 1, then a UHD atlas with pixel size of 0.5. You can use HD on non-retina devices, and UHD on retina devices. There are quite a few threads on this topic here.