[SOLVED]Where is the "Exit Game" script located?

Started by JQ, Wed 25/11/2009 19:39:56

Previous topic - Next topic

JQ

I've been looking for the "QuitGame" script of the default game that comes with AGS ("¿Are you sure you want to quit? -Yes / No") in the global script and I can't find it. I'm translating the whole GUI and I'm only missing that one.

Thank you.

Ryan Timothy B

#1
I believe I remember hearing that, that code is hard coded in AGS.  To translate it, you'll need to create your own "Are you sure you want to quit" GUI menu.  You'd have to call up the question GUI whenever the exit button is pressed (or whenever CTRL+Q is pressed)

if (keycode == eKeyCtrlQ) gExit_gui.visible=true;

Then when they click the yes button, have this:  QuitGame(0);

The Exit GUI should also pause the game when it's visible.

EDIT:  QuitGame(1);  -- Calls up the default quit menu.  and   QuitGame(0);   just quits the game without asking.

arj0n

This is the original part if I'm right:

function btnQuit_OnClick(GUIControl *control, MouseButton button)
{
 gPanel.Visible = false;
 Wait(1);
 QuitGame(1);
 gPanel.Visible = true;
 gIconbar.Visible = false;
 mouse.UseModeGraphic(eModePointer);
}

JQ

I did whay you said about creating a new Gui panel, it works great, thank you

SMF spam blocked by CleanTalk