Vizard 8 » Command Index » Vizard modules » viz » <viz>.addButton
8.0

<viz>.addButton

Adds a button affixed by default to the screen.

<viz>.addButton(  
scene = viz.MainScene  
parent = viz.SCREEN  
)  
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.
parent = viz.SCREEN
viz.WORLD
viz.SCREEN
viz.ORTHO
<node3d> object

Remarks

When a button is pressed/released it will generate a viz.BUTTON_EVENT

Return Value

<node3d:GUI:button> object

Example

button = viz.addButton()
button.setPosition(.5,.5)

See also

<viz>.addButtonLabel
<viz>.addCheckbox
<viz>.addDropList
<viz>.addProgressBar
<viz>.addRadioButton
<viz>.addSlider
<viz>.addText
<viz>.addTextbox