Author Topic: Panel Clipping with UIStretch  (Read 3215 times)

Claytonious

  • Guest
Panel Clipping with UIStretch
« on: September 20, 2012, 10:54:53 PM »
I have a panel with clipping that has draggable items in it. I am using UIStretch to make the background of the panel stretch across the screen horizontally. But when setting up the clipping of the panel, we have to input hardwired center X,Y and width/height of the panel. These will be dynamic based on the screen size. So how can I correctly setup clipping when the UIStretch is going to dynamically change the clipping area?

sabrexx

  • Guest
Re: Panel Clipping with UIStretch
« Reply #1 on: October 04, 2012, 02:48:40 PM »
I am having this problem as well. Is there a good solution for this?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Panel Clipping with UIStretch
« Reply #2 on: October 04, 2012, 03:18:38 PM »
Take the localscale of the background and calculate how big you need to made the clipping area.

If your normal width/height is 200,100 and your clipping normally is 180,80 then you just have to do math and input the numbers into the dragpanel script.