Quit or Play Gui

Started by Ghostlady, Sun 10/07/2005 20:55:50

Previous topic - Next topic

Ghostlady

I am creating a Quit or Play gui.Ã,  All the documentation I am looking at is for 2.62 or below and refers to the "interface_click".Ã,  The "interface_click" is now obsolete in version 2.7.Ã,  Can someone show me an example of where to scrip the "play" and "quit" buttons from the gui?
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven
Haunting at Cliffhouse

Ashen

Once you've given the buttons script names (e.g. btnQuit and btnPlay), you should just be able to double click them in the GUI editor window to create the relevant functions and open the editor at the right place.

Every GUI control (buttons, text boxes, etc) gets its own function, something like:
Code: ags

#sectionstart btnQuit_Click  // DO NOT EDIT OR REMOVE THIS LINE
function btnQuit_Click(GUIControl *control, MouseButton button) {
  QuitGame(0);
}
#sectionend btnQuit_Click  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart btnPlay_Click  // DO NOT EDIT OR REMOVE THIS LINE
function btnPlay_Click(GUIControl *control, MouseButton button) {
  gQuitplay.Visible = false;
}
#sectionend btnPlay_Click  // DO NOT EDIT OR REMOVE THIS LINE
I know what you're thinking ... Don't think that.

Ghostlady

That worked nice.Ã,  ;) ;D
My Games:

Hauntings Of Mystery Manor
Intrigue At Oakhaven
Haunting at Cliffhouse

SMF spam blocked by CleanTalk