Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: subspark on Mon 09/04/2007 05:10:49

Title: GUI Transparency Draw Order Issue (SOLVED)
Post by: subspark on Mon 09/04/2007 05:10:49
Hi all. I'm working on a DiG/Sam & max Style interface where you click a little icon in the bottom left corner for a popup inventory to display. The problem is I have a grid for the inventory items however the fill clor is black and I want the fill color to be 70% transparent. For this I have set up 2 GUis, one is the Inventory (with bitmap grid and icons) which has a zOrder of 2 and the other is the Inventory Backboard with a zOrder of 1
I'm using FadingThingsNonBlocking to afde in the two GUis however only one draws itself depending on which gui was told to fade in first.

For example:

string buffer;
if (interface == ACTIONS) {
// Inventory GUI
//-----------------------------------------------------
if (button == 0) {
FadeGuiIn_NoBlock(gInventory,0,-15);
}                              FadeGuiIn_NoBlock(gInventoryback,30,-15);


Any ideas?

Cheers,
Sparx.
Title: Re: GUI Transparency Draw Order Issue
Post by: Scorpiorus on Mon 09/04/2007 16:52:23
I just took a quick look into the module and from what I can see there is a bug where it won't fade in more than one GUI at a time.

To fix it, open the module script, search for the line #168...

...
if (Fading3 < MAXGUI) Fading1 ++;
...


...and replace its code with the following one:

...
if (Fading3 < MAXGUI) Fading3 ++;
...
Title: Re: GUI Transparency Draw Order Issue
Post by: subspark on Tue 10/04/2007 03:59:53
Thankyou. This issue is solved.

Beers to you.
Title: Re: GUI Transparency Draw Order Issue (SOLVED)
Post by: Lazarus on Tue 10/04/2007 08:42:04
Thanks to Scorpiorus for spotting my error and the module has now been updated.

Also it's nice to see people using the module, good luck with your project