Author Topic: How to make this kind of GUI (Nested table inside)  (Read 7006 times)

akamine

  • Guest
How to make this kind of GUI (Nested table inside)
« on: May 28, 2013, 11:28:24 AM »
Hi Guys,

can you show me any pointer how to make this kind of GUI: (Pls find attached)

I've tried to use nasted table like this:
  1. anchor+table
  2. - table(for 2 columns UI)
  3.   - btn1
  4.   - btn2
  5.   - btn3
  6.   - btn4
  7. - btn5
  8.  

but that doesn't work :(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to make this kind of GUI (Nested table inside)
« Reply #1 on: May 28, 2013, 02:49:06 PM »
10 anchors (one per button and one per label), 5 UIStretch scripts (one per button background).

akamine

  • Guest
Re: How to make this kind of GUI (Nested table inside)
« Reply #2 on: May 28, 2013, 09:34:36 PM »
Is there anyway to use a table for that? :)

the problem is, the 2-columns-button (topmost) should always be stacked onto the lower buttons so that whenever I change the lower buttons size, it won't matter. Anchor solution seems force me to hardcode the topmost button's position.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to make this kind of GUI (Nested table inside)
« Reply #3 on: May 29, 2013, 11:41:16 AM »
The table was meant to work with a fixed number of columns, but in your case you have a variable amount, so nope, there is no easy way of doing it using a table.

wizardsmoke

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 5
  • Posts: 40
    • View Profile
Re: How to make this kind of GUI (Nested table inside)
« Reply #4 on: May 29, 2013, 06:50:55 PM »
You should be able to successfully nest tables if the nested table's contents are centered around its transform.  Try using the script posted here:

http://www.tasharen.com/forum/index.php?topic=4348.msg21041#msg21041

to center your nested table's contents.