Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: spooky on June 23, 2014, 11:25:00 AM

Title: Right To Left UIGrid?
Post by: spooky on June 23, 2014, 11:25:00 AM
Is there any way to make the UIGrid organize its contents in RTL? Setting the pivot to Top Right is half way there, but each row still organizes itself in LTR.
Title: Re: Right To Left UIGrid?
Post by: raydenuni on June 23, 2014, 01:28:47 PM
Scale it by -1 in X?
Title: Re: Right To Left UIGrid?
Post by: spooky on June 23, 2014, 04:10:19 PM
That's not ideal because that flips the contents of the grid as well, making any graphics and text render backwards. Also, the scale values in the inspector are disabled by NGUI.
Title: Re: Right To Left UIGrid?
Post by: ArenMook on June 24, 2014, 04:45:31 AM
Specify a negative cell width, and there you go.
Title: Re: Right To Left UIGrid?
Post by: spooky on June 24, 2014, 06:13:55 PM
Specify a negative cell width, and there you go.

This isn't perfect, since it's a bit of work to figure out where to put the pivot, but it works. Thanks!

Edit: Actually it works fine. I'm not quite sure why, probably because of the negative math, but switching the UIGrid 'pivot' (not the containing widget's pivot) to Top Left makes the grid behave exactly how I was expecting it to.