Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: steptoe on Fri 09/12/2011 07:25:58

Title: SOLVED: Restart GUI replaced with'Do you want to quit?' GUI
Post by: steptoe on Fri 09/12/2011 07:25:58
Hi


My version (v3.2.1 Build 3.2.1.111) has a new gui when QuitGame(1);

It does not seem to have the gui listed as it did in previous versions where you could amend RestartYN gui.

How do you edit this version if its possible?

cheers
Title: Re: Restart GUI replaced with'Do you want to quit?' GUI
Post by: on Fri 09/12/2011 10:01:14
You can edit the "name" field in a GUI's property panel- when you create a new GUI its name is usually gGUI1 or something.
I think you're trying to call a GUI name that is not yet defined.

Tip: Stick to the naming convention gWhatEverName- gMainMenu, gClose etc. It really helps keeping things organised.
Title: Re: Restart GUI replaced with'Do you want to quit?' GUI
Post by: steptoe on Fri 09/12/2011 10:06:33
Hi

I finally realised my mistake.

I should call up gRestartYN instead of the QuitGame code callup, then I can customise the gRestartYN GUI and Quit from there.

Silly me  :'(

Title: Re: SOLVED: Restart GUI replaced with'Do you want to quit?' GUI
Post by: Khris on Fri 09/12/2011 13:40:26
QuitGame(1) uses a hardcoded, built-in GUI; it doesn't use gRestartYN.

If you want your own Quit GUI, add a GUI to the list and call it "gQuit". Then put two buttons on it and have the "OK" button call QuitGame(0); and the "Cancel" button call "gQuit.Visible = false;".

To show the gui, just call "gQuit.Visible = true;".

Now you can customize the gui to your liking.
Title: Re: SOLVED: Restart GUI replaced with'Do you want to quit?' GUI
Post by: steptoe on Fri 09/12/2011 19:15:07
Khris

I just revamped/adjusted gRestartYN and called it when wanting to Quit game.

Thanks for your response.

steptoe