Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: cayou on October 13, 2014, 08:03:03 PM
-
Hi guys !
I'm currently making a dialog system and I have something kinda weird happening with NGUI and my dialog box.
I'm refreshing the text letter by letter on time, and my UILabel is set to SrinkContent, so it automatically goes to the next line if the text is not fitting into the current line. When this is happening there is one frame between the moment when the new text is displayed and when the text is shrunk, you can really easily see it. How can I fix that? thanks !
PS: Maybe it's fixed on most recent versions, I'm still using an old one (3.5.6). Maybe I can apply those changes to my version as I don't want right now to update to the latest.
-
Refreshing text letter by letter? Have you seen the TypewriterEffect script that comes with NGUI?
I'm not sure about 356, it's very old though.
-
I'll take a look, maybe a video might be help what's going on right now, but I guess there is one frame between the moment when the text is displayed and when the UILabel decides to move the latest word to the next line.
-
Ok I think I got it. In your example you get first the text formatted from the UILabel, which is adding \n on lines before the text gets too long to fit into the line. I'm not doing that so when I display letter after letter the word is most of the time not completed when it goes to the next line.
Example:
"Bacon ipsum dolor sit amet pork chop pork loin tail fatback pig porch"
And then:
"Bacon ipsum dolor sit amet pork chop pork loin tail fatback pig
porche"
Which visually is not "elegant". I'll try to use the processedText from UILabel as input.