Author Topic: Expanding things next to each other to fit screen.  (Read 3583 times)

catlard

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 24
    • View Profile
Expanding things next to each other to fit screen.
« on: June 15, 2014, 09:15:03 PM »
Hi there!

So I've got a grid of photos, as I mentioned in a previous post. Currently it looks like this:

http://imgur.com/dWYaWLk

The goal is for these images to expand to be larger based on the screen's width, while maintaining some reasonable spacing in between. Is this something that UIStretch can help with? Can Scroll Views expand their contents based on screen size? or should I modify the sizes of these items on my own?

Cheers,

Simon

catlard

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 24
    • View Profile
Re: Expanding things next to each other to fit screen.
« Reply #1 on: June 16, 2014, 01:08:09 AM »
I found a workaround, which was adjusting the orthographic size of the ui's camera based on the width/height of the screen. This caused the scroll view to appear larger, but to still function in the same way.

Hooray? Hooray! I think. Although I'd still be interested to know how it was meant to be done.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Expanding things next to each other to fit screen.
« Reply #2 on: June 16, 2014, 08:25:57 AM »
UIStretch is a legacy script and should not be used. You should be using the anchoring system -- it's powerful enough to create any kind of a layout.

catlard

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 24
    • View Profile
Re: Expanding things next to each other to fit screen.
« Reply #3 on: July 11, 2014, 05:58:43 PM »
I certainly hear you on the new anchoring system, but I find it dreadfully confusing and dangerous-seeming. It seems to throw things into strange places, and shrink them as they move. I've watched a few videos on it, but whenever I use it, things get confusing. I'll try to create a video and post it here, so I can find out what I'm doing wrong!