3
« on: February 26, 2014, 09:43:40 PM »
I think I have the same or very similar issue and I'm on the latest code. Try these steps :
1. New scene.
2. ALT+SHIFT+L, chose Arial, size 25, Resize Freely, typed "MISSIONS" for text. Choose Keep Crisp - Always.
3. UIRoot changed to fixed size, 1200.
4. Add a TweenColor to the label. Set the target color to something. Set the start delay to 5 seconds.
5. Shrink your editor window to as small as you can vertically. This works best if the layout has the game view by itself vertically so you can make it very short.
6. Run. Then quickly enlarge the editor window to as tall as you can make it.
7. When the tween color goes off the label should wrap the last character.
As far as I can tell, the problem is that when mWidth is determined in ProcessText, this is based on the starting pixel density, but when it's drawn in NGUIText.Print it's using whatever the current pixel density is, and that can cause wrapping to occur. My simple fix is to save the pixel density used to calculate CalculatePrintedSize in ProcessText and in UILabel.OnFill, check it see if the pixel density has changed and if it has, call ProcessText before doing the draw. Does that seem like a reasonable fix?