Computer Science Canada Procedures in the GUI |
Author: | Wilcroft [ Fri Apr 18, 2008 4:42 pm ] | ||
Post subject: | Procedures in the GUI | ||
I'm looking for some assistance. I'm trying right now to build a game for G11, and I'm basically writing a build screen for attributes and whatnot, using the GUI. I (from what I've read/experience) realize that the GUI is not great, but due to time constraints, etc. I can't write my own. Here's my basic problem. I want to have one or two procedures that work for all attributes, but in the GUI.CreateButton call, the procedure field doesn't seem to accept parameters. Is this just me, or is this the GUI? here's my basic code:
I want to instead change it to add(p1ships(1).armor), so I can use the same procedure for all the variables. Could someone tell me if this is possible, or possibly hook me up with a way to make it work? |
Author: | Nick [ Fri Apr 18, 2008 4:54 pm ] | ||
Post subject: | RE:Procedures in the GUI | ||
you can't it's the GUI, however you could make it call a procedure which calls your procedure:
|
Author: | Wilcroft [ Fri Apr 18, 2008 5:29 pm ] |
Post subject: | Re: Procedures in the GUI |
thanks Nick. through your help, and ideas from my dad, I have figured it out using multiple buttons, which was the basis of my problem. I've managed to reduce my procedure count from 16 to 4! Wheee! |