Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: unity1.ftb on September 21, 2012, 02:18:29 AM

Title: Middle ratio problem
Post by: unity1.ftb on September 21, 2012, 02:18:29 AM
Hi!

We just got NGUI and it works great, but we are having problems to set our GUI design with it.

We are targeting a couple of resolution with ratios 4:3, 3:2 and 16:9 (the ios ratios, including iphone 5). The problem is that the design team decided to take 3:2 (the middle ratio, good people, terrible decision) as reference, so we have a main window that fits nice in 3:2 and has to keep that ratio in the other resolutions, and want to have empty space in the sides when in 16:9 and on top and bottom in 4:3. Is there a way to get that behavior with the built-in tools of NGUI without coding much or at all? If we set the root to manual and put the window under an anchor in the center it works well in 3:2 and wider resolutions (leaving empty space in the sides and scaling the window with the screen height), but that way the sides of the window get out of the screen in 4:3.

Thanks for the help and have a nice day.
Title: Re: Middle ratio problem
Post by: ArenMook on September 21, 2012, 08:10:05 AM
Yeah you kind of stabbed yourself in the foot with that one. You'll want to write code to scale the root manually here, because as you've noticed it's always based on the height of the screen.