Game Development Community

Button text color not changing

by amaranthia · in Torque Game Builder · 06/14/2008 (11:18 pm) · 1 replies

For some reason, I can't get the color of my text to change from green to red when I highlight it with my mouse. The text is on a button, and I'm using this profile for the button:

// Button
new GuiControlProfile (GuiProfileE10)
{
   fontType = %button; 
   fontSize = 30;
   justify = "center";
   fontColor = %green;  
   fontColorHL = %red;  
};

Am I missing something simple?

#1
06/22/2008 (6:31 am)
There a couple of possible reasons for this. I think it is because %red is a variable that only exists in local scope, and that memory is most likely discarded before you ever use it.

Try changing it to a global variable and see if that helps. $red

If this is not the case, try replacing red with "255 0 0". It might work?