Game Development Community

GUI Backgrounds

by PuG · in Torque Game Engine · 07/02/2007 (4:00 am) · 2 replies

Hi, having some issues with GUI's. What im trying to do is make the background semi transparent (e.g.Options), ive tried adjusting the profiles, but it uses a Fill Colour rather than bitmap?

Any suggestions?

Regards!

#1
07/02/2007 (4:11 am)
You want to check out defaultGameProfiles.cs and customProfiles.cs which are usually located in the client/ui folder.

The fourth number represents alpha - 0 being completely transparent and 255 being completely opaque.

Example - For a semi transparent grey window:
new GuiControlProfile (GuiWindowProfile)
{
   opaque = true;
   border = 2;
   fillColor = "127 127 127 127"; 
   fillColorHL = "221 202 173";
   fillColorNA = "221 202 173";
   fontColor = "255 255 255";
   fontColorHL = "255 255 255";
   text = "GuiWindowCtrl test";
   bitmap = "./demoWindow";
   textOffset = "6 6";
   hasBitmapArray = true;
   justify = "center";
};

You can re-skin the bitmap to alter the border of the window - the fill/background comes from the engine code.
#2
07/02/2007 (4:14 am)
Thank you for the quick reply - working great!

Ive been searching around for hours looking for the solution :)

Thanks again,