Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: wallabie on April 23, 2014, 01:55:06 AM

Title: ScrollView with Grid Vertical odd behaviour.
Post by: wallabie on April 23, 2014, 01:55:06 AM
I'm trying to do something very simple but not getting the expected result.

1. ScrollView with Grid (vertical). MaxPerLine = 2,  Have 8 items, would like it to look like:

1 2
3 4
5 6
7 8

but instead, I'm getting:

1 2 3 4
5 6 7 8

the clipping window is set at 2 per row, so 3,4,7,8 are being clipped while scrolling vertically. 

-- It seems that the maxPerLine for Vertical in this case means 2 vertical lines.

How to set the max number of elements per ROW for a vertical scrollView?



Title: Re: ScrollView with Grid Vertical odd behaviour.
Post by: ArenMook on April 23, 2014, 05:43:17 AM
That's because your grid needs to be horizontal, not vertical.

Max per line = columns in horizontal mode, and rows in vertical mode.
Title: Re: ScrollView with Grid Vertical odd behaviour.
Post by: wallabie on April 23, 2014, 06:54:39 AM
Cool, got it working.