Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Claytonious on September 20, 2012, 10:54:53 PM

Title: Panel Clipping with UIStretch
Post by: Claytonious 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?
Title: Re: Panel Clipping with UIStretch
Post by: sabrexx on October 04, 2012, 02:48:40 PM
I am having this problem as well. Is there a good solution for this?
Title: Re: Panel Clipping with UIStretch
Post by: Nicki 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.