Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: doncarlos91 on October 25, 2016, 05:36:22 AM
-
I have organized my content like this :
UIWrapContent
-- Item 1
-- Item 2
-- Item 3
-- Item 4
-- Item 5
-- Item 6
and i just want to make it like this horizontal grid :
UIWrapContent
-- Item 1 -- Item 2 -- Item 3
-- Item 4 -- Item 5 -- Item 6
there are some ways to do it with UIWrapContent ?
before i have used UIGrid component , but performance was awful with a lot of data :)
Thanks
-
if i know what you want, you can group the item in one col?
-
Each row would need to be a separate item, just containing 3 visible elements. When setting the data, take into account that each item has 3 elements rather than 1.
-
Thanks Aren, it works !!
-
Aren, sorry to jump in here, but could i get some clarification on that? I see that in example 14 the wrap content wraps the circularly, but im confused on how to get an item list that goes:
UIWrapContent
-- Item 1 -- Item 2 -- Item 3
-- Item 4 -- Item 5 -- Item 6
-- Item 7 -- Item 8 -- Item 9
My goal is to write a script that will loop through images and assign them to each item, then allow the user to scroll down the list. Any help would be very welcomed.
-
Exactly as you printed it:
UIWrapContent
-- Row A
----- Item 1
----- Item 2
----- Item 3
-- Row B
----- Item 4
----- Item 5
----- Item 6
Your rows are just game objects containing children (items). When you initialize each new item, treat it as 3 not just 1. For example if you get index of 3, it means you're actually going to have the content items start at 3*3=9.