Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started 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?
-
I am having this problem as well. Is there a good solution for this?
-
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.