Poll Button Click

Tests the buttons to see if one was clicked in


buttonHit = Poll Button Click


This command tests the buttons to see if one was clicked in. If one was clicked in then it returns the index in buttonHit, if not, then it returns -1.

This command is different to Wait Button Click because it does not wait until a button is clicked in. This means that using this command other operations can be performed. e.g.

' Define buttons up here

int buttonHit=-1
while buttonHit=-1

buttonHit=Poll Button Click

' Do other operations

Draw Frame


' Test the value of which button was hit

NB: You must call the 'Draw Frame' command from the loop that calls 'Poll Button Click' for the buttons to react to the mouse passing over them.

Table of contents