Open topic with navigation
<viztask>.waitButtonUp
Wait for a specified GUI button release
<viztask>.waitButtonUp( |
|
button |
) |
|
button
Button to wait for.
If button is a sequence, then the Condition will wait for one of the buttons to be released.
If button is None, then the Condition will wait for any button to be released.
Remarks
This command will create a Condition object that will wait for the specified GUI object to be released.
The yielded command returns a
viz.Data object with the following information about the condition:
button | The button that was released |
time | The precise time of the button release |
Return Value
viztask.Condition object
Example
import viztask
mybutton = viz.addButton( pos = (0.5,0.5,0) )
def MyTask():
while True:
yield viztask.waitButtonUp(mybutton)
print('My button was released')
viztask.schedule( MyTask() )
See also