demoWaitForInput

A function that can be used in Scripting.

Syntax and semantics

demoWaitForInput ( )
wait for a user event (click or key press) in the Demo window.

Behaviour

This function blocks until the user clicks in the Demo window or types a key into the Demo window.

Return value

Once the function finally returns, it returns the value 1 (true). This makes it possible to use this function in a while loop:

while demoWaitForInput ()
if demoClicked ())
# handle the mouse click
elsif demoKeyPressed ())
# handle the key press
endif
endwhile

Links to this page


© Paul Boersma 2023