1
NGUI 3 Support / Best way to alter the size of a panel through code?
« on: September 15, 2015, 01:40:02 PM »
Hello.
I am attempting to create a component that will allow a clipping panel to be resized at runtime to any arbitrary size. Should I just assign to the baseClipRegion? Is there another method? What if I also want to tween the content inside to scroll to a particular entry?
I am also confused about Center value and an Offset value. Both affect the position of the clipping area, but why are there two values instead of one? I ask because I want to be able to change the center or offset value when resizing to ensure an edge or corner of the panel stays in place while the rest expands.
I am attempting to create a component that will allow a clipping panel to be resized at runtime to any arbitrary size. Should I just assign to the baseClipRegion? Is there another method? What if I also want to tween the content inside to scroll to a particular entry?
I am also confused about Center value and an Offset value. Both affect the position of the clipping area, but why are there two values instead of one? I ask because I want to be able to change the center or offset value when resizing to ensure an edge or corner of the panel stays in place while the rest expands.
