Game Development Community

GUI Text questions

by Spencer Grey · in Torque Game Builder · 06/23/2006 (11:23 am) · 8 replies

Hey,

A few questions:

How do I ...
- make a text control wordwrap?
- tell it to go to the next line?
- set justification?

I need to make my text control work like a textarea in flash / c#. A large, wordwrapping box basically. I'm setting up a dialog box in the upper left hand corner, where I'm thinking of using schedule with substring to make my letters appear over time, but I just cant figure out how to set up the damn text control in the first place.

Thanks in advance.

#1
06/23/2006 (11:31 am)
Try the guiMLText control.
#2
06/23/2006 (11:38 am)
Perfect, thanks.
#3
06/23/2006 (12:14 pm)
Any idea how to create a newline though? Everything else is working great now :)
#4
06/23/2006 (12:15 pm)
Use the newline character: \n
#5
06/23/2006 (12:16 pm)
Thanks!
#6
06/23/2006 (2:20 pm)
You may want to check the online documentation for the various Escape Sequences you can use in your text (you may have to scroll down just a bit).

Note that c0 through c9 are defined in your GuiControlProfile, using the fontColors[x] = "R G B"; lines, such as:

fontColors[3] = "255 0 155"; should give you a purple color when you use \c3.
#7
06/23/2006 (2:21 pm)
Thanks!

Edit -- stupid refresh. But atleast it reposted what I wanted to say :p
#8
06/23/2006 (3:48 pm)
Interestingly, I'm playing around with the GUIMLTextControl myself, and seem to have found either a user error (mine), or a possible bug in the way it handles color codes across linewraps. If/when I figure it out I'll let you know!