Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Ubel on Sun 06/03/2005 13:29:51

Title: GUI fade in and out [SOLVED]
Post by: Ubel on Sun 06/03/2005 13:29:51
How do I make a GUI fade in or out?
Title: Re: GUI fade in and out
Post by: on Sun 06/03/2005 13:49:19
SetGUITransparency (int gui, int amount);

e.g.:

SetGUITransparency (INV, 100); //Totally invisible
Wait (1);
SetGUITransparency (INV, 90);
Wait (1);
// ..etc
SetGUITransparency (INV, 10);
Wait (1);
SetGUITransparency (INV, 0); // Fully visible


or (simpler way):

//int vis = 100; // declared somewhere else
while (vis > 0) {
  SetGUITransparency (INV, vis);
  vis -= 10;
  Wait (1);
}

Depends how/when you want it to happen.
Title: Re: GUI fade in and out
Post by: Ubel on Sun 06/03/2005 14:11:25
Thanks! It worked great.