Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Altaf on March 18, 2014, 07:40:56 AM
-
Hello,
I have a menu, I add items to this menu by parsing a xml file. I read height & width of the widgets form the xml & set them accordingly. I am having trouble with UIPanel clipRange.
When I add the items dynamically I need to adjust the baseClipRegion. Because of this, the UIPanel`s clipping center changes. I have set my menu such that only one item is visible at a time.
When I set the UIPanel.baseClipRegion, center changes & the widget gets clipped on either side. How do I calculate this?
Thanks,
Altaf
-
NGUIMath.ResizeWidget can be used to gently adjust the size of any widget or panel. You can also have a panel be anchored to a widget, and just change the size of the widget.
-
Thank you so much. Setting the anchor fixed my problem.
Thanks again,
Altaf