Okay here is the issue. I have 5 or 6 checkboxes for the gui i am desigining. And each is a type. Each is assigned a unique name.
However, i want to be able to get the state/value of that checkbox, but simply passing its unique name into a function.
The code below works. But if its called every game loop one function slows the entire game down immensely.
Anyone know a better way to do this?
;==========================================================
;GET THE VALUE OF THE GIVEN CHECK BOX
;=========================================================
Function GUI_GET_CHECKBOX_VAL( CHECKBOXNAMESTR$ )
For TARGET_CHECK.GUI_CHECKBOX_TYPE=Each GUI_CHECKBOX_TYPE
If TARGET_CHECK\NAME$ = CHECKBOXNAMESTR$ Then
Return TARGET_CHECK\Value
End If
Next
End Function
However, i want to be able to get the state/value of that checkbox, but simply passing its unique name into a function.
The code below works. But if its called every game loop one function slows the entire game down immensely.
Anyone know a better way to do this?
;==========================================================
;GET THE VALUE OF THE GIVEN CHECK BOX
;=========================================================
Function GUI_GET_CHECKBOX_VAL( CHECKBOXNAMESTR$ )
For TARGET_CHECK.GUI_CHECKBOX_TYPE=Each GUI_CHECKBOX_TYPE
If TARGET_CHECK\NAME$ = CHECKBOXNAMESTR$ Then
Return TARGET_CHECK\Value
End If
Next
End Function