Custom Quit Screen

Started by SonOfSkywalker, Tue 02/09/2003 13:16:14

Previous topic - Next topic

SonOfSkywalker

I've seen this in other AGS games but I can't figure out how to do it. I've had a look in the manual and the boards but I can't find anything about it.

How do I make a custom quit screen? The type that pops up above whatevers going on in the background. I'm guessing I'll need to make a GUI for it (?) but I'm not sure if theres another way.

Thanks

Ishmael

#1
GUI the only way I see, for it is wisest aswall, in my homble opinion.

Make a GUI that look like your quit screen (why do I allways type "guit" the first time?), with the yes and no buttons, of cource, and perhaps a "Do you want to quit?" label, then in the global script under interface_click put:

// presuming that the quitdialog's name is QUIT
if (interface==QUIT) {
if (button==0) // this be yes button is object number 0
QuitGame(0); // quits the game without popping up the default dialog
if (button==1) // this be no button is number 1
GUIOff(QUIT);
}

and makeing the GUI popup modal, and when the dialog needs to be shown, put GUIOn(QUIT); in the scritp for the clicked object.

And if you don't want to calculate the position by yourself, (presuming that you want the dialog in the centre of the screen) put CentreGUI(QUIT); in the game_start function in global script.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SonOfSkywalker

Ok, I got it.

Thanks very much!

SMF spam blocked by CleanTalk