<vizact>.onbuttondown

Registers a function to handle button down events

 

<vizact>.onbuttondown(
    button    
    func    
    *args    

)

 

button

The GUI object to handle


func

The function to call when the GUI object is pressed


*args

The arguments to pass to the function


Remarks

When the specified GUI object is pressed the given function will be called.

Return Value

None

Example

check = viz.add(viz.CHECKBOX)

#The checkbox will control if collision is enabled
vizact.onbuttondown(check,viz.collision,viz.ON)
vizact.onbuttonup(check,viz.collision,viz.OFF)