Author Topic: Vertical, Horizotnal, Grid Layouts  (Read 3954 times)

amraffay

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 37
    • View Profile
Vertical, Horizotnal, Grid Layouts
« 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 :)
« Last Edit: April 12, 2014, 08:44:23 AM by amraffay »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: App like UI - Basics Question
« Reply #1 on: April 12, 2014, 04:36:52 AM »
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.

amraffay

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: Vertical, Horizotnal, Grid Layouts
« Reply #2 on: April 12, 2014, 08:49:11 AM »
@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

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Vertical, Horizotnal, Grid Layouts
« Reply #3 on: April 12, 2014, 09:15:50 AM »
2nd question: Look at UIGrid and UITable for your needs. ;)

amraffay

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: Vertical, Horizotnal, Grid Layouts
« Reply #4 on: April 12, 2014, 10:55:59 AM »
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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Vertical, Horizotnal, Grid Layouts
« Reply #5 on: April 13, 2014, 12:40:13 AM »
Just specify a bigger cell size and there you go -- gaps.

amraffay

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: Vertical, Horizotnal, Grid Layouts
« Reply #6 on: April 13, 2014, 03:40:37 AM »
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

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Vertical, Horizotnal, Grid Layouts
« Reply #7 on: April 13, 2014, 06:34:08 AM »
If you want it to take the size of its content, then it would be UITable rather than UIGrid.

amraffay

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: Vertical, Horizotnal, Grid Layouts
« Reply #8 on: April 17, 2014, 02:10:40 AM »
Sure, Thanks :)