Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Wisteso on September 11, 2016, 11:38:11 PM
-
I've been struggling to find a way to get this to work. I can have "resize freely" or "clamp content", but there is no option that lets allows both.
I could just set it to a fixed size of 300, but I need the label to grow/shrink due to having a background sprite anchored to it.
(NGUIText.GetEndOfLineThatFits is almost what I need (with some extra custom code), but it's giving the wrong side of the string.)
-
NGUIText calls are context sensitive. You must first set what you're working with before using any NGUIText call. For example, label.UpdateNGUIText(), then use NGUIText.GetEndOfLineThatFits.
-
The problem is I would need something like "NGUIText.GetStartOfLineThatFits" but that doesn't exist, and with all the context stuff it's pretty messy to to add it anywhere besides the same class.
-
What would that do? Start of line that fits is just the beginning of the text line. The end of line that fits is used to determine where the line should wrap.