Game Development Community

Text Control Characters

by Mark Smithh · in Torque Game Engine · 08/12/2002 (6:29 pm) · 10 replies

I can't seem to locate any documentation on the
special text control characters that torque uses.

I am specifically looking for how to change the text font
and color, using these.

#1
07/26/2003 (11:09 am)
I just found your old message. You probably don't need this anymore, but here are the tags I found in the code along with notes on some of them:


\n - new line
\t - tab stop
- sample use: "Foo"

- red green blue in hex format

- link color highlight

- saves current text format
- restores text format that was pushed

- left justification
- right justtification
- centers text






- set tab stops?

#2
07/26/2003 (11:41 am)
Still pretty useful response Kevin, thanks, now i don't have to dig for that info!
#3
01/19/2004 (2:48 am)
Hi guys!

How can I make a newline\return in the text of a GuiTextCtrl? I've tried \n, NL, even
but it doesn't work...

Any ideas?

Thanks!
#4
01/19/2004 (3:01 am)
Try @ on the end of it, such as Your Text Here"@ "More Text";
#5
01/19/2004 (5:15 am)
I'm creating the text to be displayed in the engine itself (C++), so I can't use the @...
#6
01/19/2004 (5:21 am)
Just a shot in the dark here, but did you try "\\n" Not sure if Torque does it this way, but for some things I have worked with they required the text "\n" to be there, not the newline replacement that C/C++ will give an escaped char.

Worth trying if you haven't.
#7
01/19/2004 (5:40 am)
Nope, that doesn't work either :)
#8
01/19/2004 (6:08 am)
Try using GuiMLTextCtrl instead of GuiTextCtrl

ML = Multi Line

-Ron
#9
01/19/2004 (6:23 am)
Now there;s something.. what controls do these text codes work for?

Phil.
#10
01/19/2004 (7:58 am)
Thanks Ron!