How do I "close" all Gui's?

Started by miguel, Thu 13/10/2011 23:43:14

Previous topic - Next topic

miguel

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
Working on a RON game!!!!!

pcj

#1
Something like:
Code: ags
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)
Space Quest: Vohaul Strikes Back is now available to download!

miguel

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
Working on a RON game!!!!!

monkey0506

#3
According to CJ*, 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! :=

pcj

Space Quest: Vohaul Strikes Back is now available to download!

SMF spam blocked by CleanTalk