Game Development Community

Coloring text in gui's

by Vijay Myneni · in Torque Game Engine · 01/06/2005 (5:58 pm) · 2 replies

Hello,

I have a line of text in a HUD, and I want part of the text to be a different color sometimes. Like maybe I want to display the character's name as "Name: Chuck" and have the "Chuck" part display in red when he's getting damaged or something. Is there any way to do this? All I can see to do is change the profile on the GUI element, but then it affects the whole element. Any thoughts?

Thanks,
Vijay

#1
01/06/2005 (6:22 pm)
Nevermind, figured out how to do this using the whole

fontColors[1] = "0 255 0";

and "\c1" thing. Torque rocks.
#2
01/11/2005 (8:35 am)
Thanks for posting the solution as well as the problem. :)