GUI trouble [SOLVED]

Started by simulacra, Sun 04/09/2005 02:06:55

Previous topic - Next topic

simulacra

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();
  }

Rui 'Trovatore' Pires

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?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

edmundito

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.

simulacra

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!

monkey0506

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...

SMF spam blocked by CleanTalk