Author Topic: UIStretch ignore parent panel scale  (Read 2502 times)

diederik

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 31
    • View Profile
UIStretch ignore parent panel scale
« on: November 07, 2013, 05:11:17 AM »
Hi all!

I'm using UIStretch on a sprite that's parented to a panel that is dynamically (down) scaled depending on the resolution of a device.
But I DO want it to stretch or use the full screen resolution, kind of countering the smaller scale of the panel.

There must be a way to do this in UIStretch, by using the Ui Camera, Widget or Panel Container variables.
But I just cannot figure it out (especially since the scaling of the parent panel is so dynamic.

Please help! Thanks,

Diederik

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIStretch ignore parent panel scale
« Reply #1 on: November 07, 2013, 05:49:04 AM »
UIStretch adjusts the width and height. It won't touch the scale component. If you want different functionality, just write your own scaling logic script. UIStretch code is available to be used as an example.

diederik

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 2
  • Posts: 31
    • View Profile
Re: UIStretch ignore parent panel scale
« Reply #2 on: November 07, 2013, 09:51:31 AM »
Hi ArenMook,

Thanks for your reply. I think I'll write something custom for now, and see how it all turns out when updating to the newest version for the next project.

For now I'm just wondering if anyone else is scaling panels to make the UI fit different resolutions and devices. For most stuff, it works great!
It's just that UIStretch is pretty handy but becomes a bit useless when not compensating for this :).

D