Line breaks in FlxText

273 views
Skip to first unread message

David S Gallant

unread,
Feb 7, 2015, 10:49:57 PM2/7/15
to haxef...@googlegroups.com


So I've got a situation where I'm filling a FlxText with a fair amount of text broken up with line breaks. However, each line break appears to be parsing as a double line break when rendering the text. Take, for instance, this example text:

This is a reminder that the new call monitoring procedures discussed during last month's team meetings go into effect today. Supervisors will be live-monitoring your calls, so remember:
- be courteous
- control the conversation
- proper security on every call 
Failure to adhere to these rules will result in disciplinary action, up to and including termination. 
Let's work together to give the best experience to our callers! 
Sincerely, 
upper management

This text renders as you see in the image attached. I can't find anything in the documentation about affecting the size or amount of line breaks in the text field. Any help?
email_linebreaks.png

Ashiq A.

unread,
Feb 7, 2015, 11:06:54 PM2/7/15
to haxef...@googlegroups.com
Hi,

How does your text appear in a text editor with newlines showing? Do
you have cr (carriage-return), lf (line feed), or both? Maybe if you
have both, you only need one of the two.

For example, in C#, we usually append \n (newline), not \n\r (which
would be both Unix and Windows newline characters).

--Ashiq
> --
> HaxeFlixel Development Community
> See our github https://github.com/haxeflixel/ and our documentation
> http://haxeflixel.com/documentation/
> ---
> You received this message because you are subscribed to the Google Groups
> "HaxeFlixel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haxeflixel+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/haxeflixel.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/haxeflixel/3b0d90f5-3f94-4cd0-a802-a7eeba2c063a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

David S Gallant

unread,
Feb 8, 2015, 9:07:26 PM2/8/15
to haxef...@googlegroups.com
Thanks, Ashiq!

I'm using FlashDevelop, and it turns out it WAS set so that line ends had both CR and LF. I was able to change that setting under File -> Line Ends. No more double line breaks!
Reply all
Reply to author
Forward
0 new messages