Sub Process_Globals
Type Tags(row As Int, col As Int, blue As Boolean)
End Sub
Sub Activity_Create(FirstTime As Boolean)
Dim x, y As Int
For x = 0 To 9
For y = 0 To 7
Dim lbl As Label
Dim rcb As Tags
rcb.row = y
rcb.col = x
rcb.blue = True
lbl.Initialize("lblSPOTS")
Activity.AddView(lbl, x * 50, y * 50, 45, 45)
lbl.Tag = rcb
lbl.Color = Colors.Blue
Next
Next
End Sub
Sub lblSPOTS_Click
Dim lbl As Label
Dim rcb As Tags
lbl = Sender
rcb = lbl.Tag
If rcb.blue = True Then
lbl.Color = Colors.Green
Else
lbl.Color = Colors.Blue
End If
rcb.blue = Not(rcb.blue)
Activity.Title = "Button x = " & rcb.col & " y = " & rcb.row
End Sub