How do I link a save icon from GUI: gPanel? [SOLVED]

Started by rickious, Mon 30/09/2013 13:54:13

Previous topic - Next topic

rickious

I had to remove the save icon from the gPanel because i balled something up in the code somewhere somehow.  So I want to add a 'save' and 'load' icon, how do I link these to the save and load GUIs?

Thanks in advance.  I can get on with other things now.
--COMING SOON--
'Body Pharm' beta demo.

Body Pharm - coming soon!

TGames

first you would set up the buttons on the gPanel, then you would go to the actions menu,and hit on click. you would then code:
gPanel.Visible=false;
insert svae or load gui name
g               .Visible=true;
I hope this helps

Khris

This works for a custom save/load GUI.

To show the built-in ones, just call RestoreGameDialog() / SaveGameDialog().

rickious

when you say 'call', how do i do that?  :-[
--COMING SOON--
'Body Pharm' beta demo.

Body Pharm - coming soon!

Crimson Wizard

Quote from: rickious on Mon 30/09/2013 20:28:50
when you say 'call', how do i do that?  :-[

"Call" = "Call function" (programming/scripting term) = write function name with parameter list between opening and closing brackets.
Examples:
Code: ags

RestoreGameDialog(); // no parameters expected, hence nothing between brackets
SaveGameDialog();
float x = Math.Cos(1); // "calling" cosin function


Khris

Also, in case that's unclear: create the button's OnClick function and link it to the event by double clicking the button in the GUI editor. Then just write the command inside the function.

rickious

Cheers people, you learn something new every few hours with AGS (laugh)
--COMING SOON--
'Body Pharm' beta demo.

Body Pharm - coming soon!

SMF spam blocked by CleanTalk