Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: sk1989 on November 27, 2012, 01:57:31 PM

Title: Getting the current Line WIDTH in pixels not max LIne width
Post by: sk1989 on November 27, 2012, 01:57:31 PM
YES, I saw all the posts in the thread regarding this issue but none of them actually help and have a proper solution.

I need to know how i can get the current line width of a UILABEL not max line width thats get set in the inspector.

here is wat i am doing right now to get it

UILABEL.font.CalculatePrintedSize(UILABEL.text,true,UIFont.SymbolStyle.None).x * UILABEL.transform.localScale.x)

when i debug this i am gettting the line width but when i assign this to the transform position , its turning out to be zero.


Title: Re: Getting the current Line WIDTH in pixels not max LIne width
Post by: sk1989 on November 27, 2012, 04:30:08 PM
nvm it works now using UILabel.relativeSize