
-----------------------------------
Wilcroft
Fri Apr 18, 2008 4:42 pm

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:
import GUI
type shipdata :
    record
        armor : int
        shield : int
        laser : boolean
        laserstr : int
        missle : boolean
        misslenum : int
        fighters : boolean
        hangers : int
        scanrange : int
        speed : int
        size : int
        pointdef : boolean
        pdstrength : int
    end record

var p1ships : flexible array 1 .. 1 of shipdata
var total:=20

p1ships (1).armor := 0

proc add %(var num : int)
    p1ships (1).armor += 1
    total-=1
    if total 