scene = viz.MainScene
If the parent is viz.WORLD or viz.SCREEN, then the argument represents the scene to add the object to.
If the parent is viz.ORTHO, then the argument represents the window to add the object to.
If the parent is a valid node3d object, then the argument is ignored.
A toggle button behaves similar to a checkbox or radio button, except it contains a text message.
Example 1:
toggle = viz.addToggleButton('Toggle Me',parent=viz.ORTHO,fontSize=20,pos=(100,100,0))
vizact.onbuttondown(toggle,viz.logNotice,'Toggle down')
vizact.onbuttonup(toggle,viz.logNotice,'Toggle up')
Example 2:
group = 'MyGroup'
option1 = viz.addToggleButton('Option 1', group, parent=viz.ORTHO,fontSize=18,pos=(100,50,0))
option2 = viz.addToggleButton('Option 2', group, parent=viz.ORTHO,fontSize=18,pos=(200,50,0))
option3 = viz.addToggleButton('Option 3', group, parent=viz.ORTHO,fontSize=18,pos=(300,50,0))