Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Leisure Suit Harry on Tue 24/05/2011 21:19:48

Title: Where is the quit GUI?
Post by: Leisure Suit Harry on Tue 24/05/2011 21:19:48
I have started to customize all GUIs from the default game but I cannot find the quit GUI (Are you sure you want to quit...). Where the hell is it?
Title: Re: Where is the quit GUI?
Post by: barefoot on Tue 24/05/2011 21:43:26
If you want to make your own custom quit GUI so that you can edit parts of it, create one and use it- the quit button of such a selfmade GUI would then call QuitGame(0) in order to quit the game without using the build in "quit the game (yes/no)" message.

I use this myself from a Quit button which brings up the Do you want to quit gui which iv'e customised.

See also:

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=38466.0 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=38466.0)


Title: Re: Where is the quit GUI?
Post by: monkey0506 on Tue 24/05/2011 23:02:55
In fact, most of the pop-up dialog GUIs like that with the same bland grey look to them are hard-coded, built-in interfaces that you can't change at all, just as a fallback for people who don't want to make one themselves. :P

As barefoot said, just create your own GUI. Then, you'll have to add some script yourself:

// global script

// on_key_press
  // ...
  else if (keycode == eCtrlQ) gQuit.Visible = true; // turn on Quit GUI

// btnQuitYes_Click - this function should be created for you by the Events pane
  QuitGame(0);

// btnQuitNo_Click
  gQuit.Visible = false;
Title: Re: Where is the quit GUI?
Post by: Leisure Suit Harry on Wed 25/05/2011 06:18:45
Thanks a lot - I'm gonna make it so.