Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: amraffay on April 11, 2014, 04:50:02 PM
-
Hi there,
Is there any horizontal, vertical or grid layouts?
For example, i want to layout a number of buttons, in a vertical manner with some gap.
and in anther situation i want to layout them in a grid way (rows, columns)
Please advise :)
-
Anchor the sprites so that they are anchored left to left, right to right, top to top, bottom to top. This will give you flexible width but fixed size height (this is for the top sprite). UIRoot doesn't have much to do with this and I am not sure what "free aspect or 100% width but fixed size" means.
-
@ArenMook
Sorry, i didnt saw your comment (browser cache) and updated my question about grids as i have already found the answer of previous question. Thanks for your reply though :)
Now waiting for 2nd question, and next time im gonna force refresh firefox and create a new topic.
Thanks
-
2nd question: Look at UIGrid and UITable for your needs. ;)
-
Thanks for the reply, both works
In my case i want to use UIGrid, but it provides fixed cell,width (i need fixed)
but is there any way to add gap? between items?
-
Just specify a bigger cell size and there you go -- gaps.
-
Yup, thats how i solved it.
But you may want to add it in next release :)
Also instead of taking size from cell width etc, it can take size ffrom the content (item with max width, height)
Thanks
-
If you want it to take the size of its content, then it would be UITable rather than UIGrid.
-
Sure, Thanks :)