(Formerly known as SetGUITransparency, which is now obsolete)
int GUI.Transparency
Gets/sets the GUI translucency, in percent.
Setting this to 100 means the GUI is totally invisible, and lower values
represent varying levels of translucency. Set it to 0 to stop the
GUI being translucent.
NOTE: Transparency only works in 16-bit and 32-bit colour games.
NOTE: When using the DirectX 5 driver, a large transparent character can significantly slow
down AGS.
Some rounding is done internally when the transparency is stored -- therefore, if you get
the transparency after setting it, the value you get back might be one out. Therefore, using
a loop with gInventory.Transparency++; is not recommended as it will probably
end too quickly.
In order to fade a GUI in/out, the best approach is shown in the example below:
Example:
int trans = gInventory.Transparency;
while (trans < 100) {
trans++;
gInventory.Transparency = trans;
Wait(1);
}
will gradually fade the INVENTORY GUI out until it is invisible.
See Also: Object.Transparency
|