Game Development Community

BitmapButtonTextCtrl

by Eric Schwegler · in Torque Game Builder · 12/13/2006 (5:42 am) · 3 replies

Hi there,

Does anyone know if its possible to change the Font Color of a GuiBitmapButtonTextCtrl when its Highlighted?
It does not seem to take the fontHL from the profile, like a PopUpMenu does.

greetz

#1
02/25/2007 (10:55 am)
Hey Eric,

I just figured it out.

you have ot create a file called "profiles.cs" and place it in your gui folder, then add a profile that handles all of the coloring and such, like this:

// nameofProfile = case sensitive and should both match
if(!isObject(nameofProfile)) new GuiControlProfile (nameofProfile)
{
   // set the font color
   fontColor = "255 255 255";
 
   // set the highlighted text color to be the same as the normal text color
   fontColorHL = "255 255 0";

   // set the highlighted fillColor to be completely transparent
   // or you can set it to whatever you want
   // note that when alpha is 0, the RGB values don't matter
   fillColorHL = "0 0 0 0";
};

Then when editing your gui file, just change the profile to that 'nameofProfile', and you should be in business.
#2
02/25/2007 (11:24 am)
Ooops!

Also, make sure that you include:

exec("~/gui/profiles.cs");

in your main.cs file, inside the "InitializeProject()" function above your gui file includes.
#3
04/26/2007 (1:53 am)
Thank you for your reply.