Game Development Community

GuiWindowProfile Background

by Vincent BILLET · in Torque Game Engine · 01/13/2006 (2:00 am) · 5 replies

I want to set a transparent background for Windows with GUIWindowProfile.

I didn't found any documentations in GG web site.

How can I do?

#1
01/13/2006 (7:54 am)
Could you explain a bit more? I'm not sure how a background (which is normally the "farthest" thing in a render) could have any benefit to being transparent, since there would be nothing behind it?
#2
01/13/2006 (7:59 am)
I Found It !

In GuiWindowCtrL.cpp (for TSE) at line 561, just comment this line like this.
//GFX->drawRectFill(winRect, mProfile->mFillColor);
#3
01/13/2006 (8:16 am)
Ok, but that means that all of your GuiWindowControls are always "empty", in that they cannot have a color. Try setting it in script to 0 0 0 0 or 0 0 0 255 (I can never remember which value is full transparency) as the fillColor in the control profile (script) instead.

General note: while not many of the examples show it, all colors in a gui control profile (well, most, experiment) can have a 4th attribute, which is the transparency of the color.
#4
01/13/2006 (8:33 am)
Excellent ! I didn't know that we can set alpha with GUI ! Th'at's really great... I set it to 0 0 0 128 and the result is very good !

Thanks.
#5
02/19/2006 (10:21 am)
I can't seem to figure this out. I've tried using the fillColor property but it seems to have no effect on the window at all. Also, I was wondering how to use a custom window layout without effecting it on a global scale.