SOLVED - Custom Quit GUI

Started by Kal-El, Mon 24/10/2005 14:02:35

Previous topic - Next topic

Kal-El

Hi, I've read the Custom Quit GUI section here (http://www.adventuregamestudio.co.uk/actutgui1.htm) but this was written before the latest version of AGS so a lot of the functions are invalid or have been omitted.

I've designed the actual interface and new buttons - no problem here.

The problem is how do I code the YES NO buttons? i.e. when it says 'are you sure you want to quit? YES NO' how do I make it quit if you click on the YES button and how do I make it resume the game when I click on the NO button?

Ubel

Code: ags
if (button == 0) { //The Quit button
Ã,  QuitGame(0);
}

if (button == 1) { //The Return-to-game button
Ã,  gQuit.Visible = false; //Here gQuit is your quit GUI.
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, //So if your GUI's script name is for example "EXIT" then you change this to gExit.Visible = false;
}


I hope this helps.

Kal-El

That's good thanks.

But how do I call the new quit GUI after the user clicks on QUIT in the status bar? The Quit GUI is called QUITGUI (gQuitgui).

Thanks in advance!

Ubel

You just simply use the Visible code again:

gQuitgui.Visible = true;

If this is what you meant.

Ashen

This is really all in the manual - if you're just coming back to AGS, try reading through it to re-familiarise yourself.
Although, I admit some of the tutorials link on the site could use updating.
I know what you're thinking ... Don't think that.

Kal-El

#5
Bloody hell, of course! lol

Thanks Pablo!

Quote from: Ashen on Mon 24/10/2005 14:37:11
This is really all in the manual - if you're just coming back to AGS, try reading through it to re-familiarise yourself.

I did read through it but it doesn't really go in-depth enough to cover what I needed to do. The online guides were my best option but they too were out of date.

Anyhow, problem solved now!

Ubel

Quote from: Kal-El on Mon 24/10/2005 14:40:05
I did read through it but it doesn't really go in-depth enough to cover what I needed to do.

Quote
Visible property (GUI)

Example:

gSettings.Visible = true;

will turn on the SETTINGS GUI.

That was the example from the manual and I think that was all you needed to know. :)

Ashen

#7
Visible Property (GUI)

QuitGame

Seems fairly detailed to me.

Beaten to the punch, but what the heck.

Looking  at the tutorial you linked, the only major change is GUI.Visible replacing GUIOn/Off(). Oh, and the individual GUI control functions replacing the global interface_click (which is probably the more confusing, it's true).
I know what you're thinking ... Don't think that.

Kal-El

Yes but it didn't go too in-depth for me. It meant nothing to me infact. This is my first time at designing my own custom GUI so I found it quite difficult.

That's why I resorted to the online 'detailed' guide.

SMF spam blocked by CleanTalk