Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Warka0OO on September 09, 2013, 12:18:40 PM

Title: Size of UILabel
Post by: Warka0OO on September 09, 2013, 12:18:40 PM
Hi everyone ! :)

I clearly didn't find the real size of the UILabel. relativeSize and lineWidth aren't the correct values for the real size of the label.
Where can i get this ?

ex:
     
     
Label                                                                      o
^                                                                          ^
start position with pivot left                                       position relativeSize or lineWidth on X
      ^
      the X value i want

Thx !
Title: Re: Size of UILabel
Post by: Warka0OO on September 10, 2013, 02:39:43 AM
Soooooo stupid boy.  ;D

NGUIMath.CalculateWidgetCorners(label)[3]   <---- if you need
Title: Re: Size of UILabel
Post by: ArenMook on September 10, 2013, 07:01:05 AM
In NGUI 3.0 the same code will be label.corners[3]. However note that this gives you the position of the bottom-right corner, not the label's size.