Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: dsanchez on February 13, 2013, 11:58:27 AM

Title: Scale in different aspect ratio
Post by: dsanchez on February 13, 2013, 11:58:27 AM
Hello,
We are trying to do a shop menu in a landscape game, with ngui suporting different aspect ratios. We've got the scale mode as fixed width but the way ngui scales is getting the height as reference, not the width (which is what we need). We've read in the forum that it would be available in next updates but we didn't find it. Also we've found a couple of script helpers but they didn't work as we want (or maybe we don't know how to use them)
We attached 3 screenshots:
what we did with ngui in a resolution of 2048x1536 aspect ratio 4:3
what we want in a resolution of 1920x1080 aspect ratio 16:9 (the ui scales with the width as reference)
what we get in a resolution of 1920x1080 aspect ratio 16:9 (the ui scales with the height as reference and thats because there are two strips at the sides)
We don't mind that the bottom items "dissapear" because we have a vertical scroll.
Thanks for the help.
Best regards.
Title: Re: Scale in different aspect ratio
Post by: ArenMook on February 13, 2013, 01:34:12 PM
Sounds like you need a modular UI set up with anchors. NGUI is always height-based, never width. Use anchors to attach things to sides of the screen.