Game Development Community

Text Colour In GUI Editor

by David Taylor · in Torque Game Builder · 03/21/2006 (7:57 pm) · 3 replies

I want to put text in a GUI I'm making. So I'm adding a new control: GuiTextCtrl, then adding text into the 'text' line under the 'General' heading. However, I can't actually see the text. This may well be because my background image is almost black in colour. How do I change the colour of the text? Or, if it isn't visible, how do I make it visible?

#1
03/21/2006 (8:10 pm)
Okay, I've found this thread:

www.garagegames.com/mg/forums/result.thread.php?qt=28026

But how exactly do I do what the second poster has suggested?
#2
03/23/2006 (9:44 am)
In your GuiTextCtrl declaration there's a line that says 'profile = ;'. This gives the GuiTextCtrl its basic look-and-feel. Elsewhere in the script files (by default it is in common/gui/profiles.cs) lie the declaration of the default set of these profiles. Open this up and you'll probably find it to be fairly self-explanitory, especially looking at GuiDefaultProfile which has a lot of the color/style fields you're looking for.

You can play with those profiles directly to learn and see if that solves your problem, but in the end you really want to make your own profiles from scratch (or at least by inheriting from one the existing profiles). Check the docs and/or forum search for GuiControlProfile to learn tons more about how these work and some of the hidden gems that aren't always obvious by looking at profiles.cs.
#3
03/23/2006 (10:41 am)
Thanks for that, Luke. Problem solved. :)