Author Topic: Resize Children  (Read 3712 times)

GroovyGray

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Resize Children
« on: April 30, 2014, 04:09:00 PM »
When resizing the screen I need the 4x4 area to always stretch and squash to the screen ratio like in the image. I have not be able to find a way to do this with anchors. The example image was done using unity scale values, if I use a stretch component on the parent of the squares it doesn't scale in a way that will effect the children. any ideas?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Resize Children
« Reply #1 on: April 30, 2014, 06:00:14 PM »
Quite simple to do with anchors. Switch anchors to Custom and adjust the relative value. Check the UIRect documentation page for more info: http://www.tasharen.com/forum/index.php?topic=7013.0
« Last Edit: April 30, 2014, 06:56:55 PM by ArenMook »

GroovyGray

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Resize Children
« Reply #2 on: April 30, 2014, 06:43:20 PM »
Thanks, that did it!