Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: simulacra on Sun 04/09/2005 02:06:55

Title: GUI trouble [SOLVED]
Post by: simulacra on Sun 04/09/2005 02:06:55
I cannot make any sense out of this. I want to display a custom quit GUI when clicking on a top menu and hide that menu and a status bar as well. But they won't hide. This is the code from interface_click:

  if (interface == 1) {
    if (button == 3){   // see inventory
      //InventoryScreen();
         ItemScreen();
   }
    else if (button == 4)    // save game
      sgs_save();
    else if (button == 5)   // load game
      sgs_load();
    else if (button == 6) {  // quit
         GUIOff(0);
         GUIOff(1);
         Wait(1);
         GUIOn(11);
         GUIOn(0);
         GUIOn(1);
         }

    else if (button == 7)    // about
      AboutGame();
  }
Title: Re: GUI trouble
Post by: Rui 'Trovatore' Pires on Sun 04/09/2005 08:19:22
I'm sorry but I don't understand... you want to hide the menu and GUI, which I assume are GUIs 0 and 1? But then why do you turn them back on immediately after turning them off?
Title: Re: GUI trouble
Post by: edmundito on Sun 04/09/2005 09:14:38
here's some mistakes I used to make on the old AGS 2.62 system and below:

- Make sure your quit button (the one that you click on, button 6) has Run Script selected
- Make sure that your quit button is indeed #6
- Make sure you're inthe right interface
- make sure that your other guis are popup modal or normal (probably popup modal)

that's it, I guess.
Title: Re: GUI trouble
Post by: simulacra on Sun 04/09/2005 13:05:02
Quote from: Rui "Brisby" Pires (a Furry) on Sun 04/09/2005 08:19:22
I'm sorry but I don't understand... you want to hide the menu and GUI, which I assume are GUIs 0 and 1? But then why do you turn them back on immediately after turning them off?

Good point. I must have thought that displaying the modal GUI 11 would pause the game or make it enter a subroutine or something. Thanks!
Title: Re: GUI trouble [SOLVED]
Post by: monkey0506 on Sun 04/09/2005 20:24:05
I think pausing the game really only stops things like mouse-clicks/button presses being registered and rep_ex being run...I was kind of wondering why you had just turned them right back on...