Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: miguel on Thu 13/10/2011 23:43:14

Title: How do I "close" all Gui's?
Post by: miguel on Thu 13/10/2011 23:43:14
Hi guys,

I know it is lack of respect to show up years later with a question but...

How do I tell AGS to shut down (turn off) all Guis in one go?
I currently have to do a lot of manual work turning them off.

Thanks in advance
Title: Re: How do I "close" all Gui's?
Post by: pcj on Thu 13/10/2011 23:48:21
Something like:
short x = 0;
while (x<Game.GUICount) {
 gui[x].Visible = false;
 x++;
}


(Or you can DisableInterface(); if you just want to disable interaction with GUIs)
Title: Re: How do I "close" all Gui's?
Post by: miguel on Thu 13/10/2011 23:56:03
pcj,
thanks for the quick answer,

I forgot how good this site is, it's still the best place around the net,

thanks again, will try it now.

Miguel
Title: Re: How do I "close" all Gui's?
Post by: monkey0506 on Fri 14/10/2011 03:47:50
According to CJ (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=21214.msg259479#msg259479)*, operations on short (16-bit) variables are actually slower on 32-bit systems than operations on ints (32-bit). He said that shorts should therefore only be used instead of ints when memory consumption is an issue (large arrays or structs primarily). That may be an AGS-specific issue, and you probably wouldn't notice the difference, but it's just better in this case to use an int. ;)

*And yes, I totally n00b'd that one! :=
Title: Re: How do I "close" all Gui's?
Post by: pcj on Fri 14/10/2011 04:06:39
Huh.  Good to know.