Can You Do New Lines In Text other than a guiMLTextCtrl?
by Harry Durnan · in Torque 2D Beginner · 06/27/2017 (10:15 pm) · 2 replies
In the old Torque 2D when using t2dTextObject's you could put in new line breaks (n) and it would draw them properly in the code. In trying to use T2D MIT with TextSprites it doesn't seem to be accepting them. Is this the expected behavior, or is there a setting that needs to be changed for this to work? I tried using NL as well, but that doesn't seem to do anything. The only items I can seem to find talking about doing new lines in regards to T2D MIT seems to be with GuiMLTextCtrls. Is this the only text drawing object that allows manual new lines as part of the text now?
About the author
Author of It's A Wipe! (http://www.iawgame.com :)
#2
07/07/2017 (4:47 pm)
I poked around the C++ code a little and the short answer is no. The new TextSprites don't handle special characters. I'm pretty sure there's a way to add them in by editing TextSprite.cc, but after a couple quick attempts it was just easier for what I'm doing currently to toss in multiple TextSprite objects and move on. I put it in as an issue on Github if anyone wants to take the time to get it working properly.
Rob J McInroy