Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: BrightBit on June 24, 2014, 03:37:37 AM
-
Hi,
How can I center a table or a grid in the middle of a screen or in the middle of a widget? Is there a way to change the pivot of a table from "top left" to "center"?
Greetings
BrightBit
-
No, table doesn't have a pivot. Only the grid does. You can reposition the table via code by using NGUITools.CalculateRelativeWidgetBounds to determine the bounds of the table, and then off-setting its position by half of its width and/or height.
-
A bit unintuitive but it worked. Thank you. :)