Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: flavoredCoffee on October 14, 2013, 03:17:31 PM
-
Hi,
I'm still using NGUI 2.x (legacy reasons) -- I'm trying to make my app adjust the layout for iPad portrait & landscape.
I've designed & created all my UI with the portrait display as default, and everything works as I want. When the iPad is flipped to landscape, my plan is to take my UI panels and reposition them to the right of the game area (I take the gameplay camera and adjust it so it's on the left of the screen).
How do I tell an NGUI panel that it's limited in width -- right now they fill the screen.
Thanks,
FC.
-
UIAnchor makes elements align to different sides of the screen.
You can try to add this to your elements to make it move to the right.
There are examples in the downloaded packages.
-
That doesn't have the result I'm looking for.
I ended up re-parenting the elements to a couple of empty game objects and then reposition those elements through code. Not as elegant, but seems to work.
-
UIStretch can stretch panels in NGUI 3.0.2, but since you're using an older version... all I can suggest is do your own logic, or adapt the code from the latest version.