Game Development Community

Invisible GUI elements?

by Rodney (OldRod) Burns · in Torque Game Engine · 12/08/2005 (10:09 am) · 2 replies

I have a background image that I am using as a GUI screen. Built into this screen are places for the player to enter text. I positioned a guiTextEditCtrl over these areas and I have it working just fine - it even stays pretty well aligned in various resolutions :)

Now what I want to do is make it so the guiTextEditCtrl is invisible, so it will blend into the background and look like the user is typing directly into a box on the background image. Is there a way to do that?

#1
12/08/2005 (10:32 am)
You can do this through the fillColor field of the GuiProfile. You can add an extra alpha component to the color:

ie
new GuiControlProfile( GuiTextEditProfile )
{
   ...
   fillColor = "255 255 255 128";     //white bg with half transparency
};

edit: tags
#2
12/08/2005 (10:38 am)
Ah, thanks. I'll give that a try :)

*edit* Worked great! I also set the border to 0 and made the border thickness 0 and now it's totally invisible. Thanks again!