Open topic with navigation
<viz>.addSlider
Adds a slider affixed by default to the screen.
<viz>.addSlider( |
|
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
A slider is a GUI object that allows the user to select a value between a 0-1 range. The slider will generate a viz.SLIDER_EVENT when the value changes. It will also generate a viz.BUTTON_EVENT when the slider gains/loses input focus. If the user clicks on the slider bar the value will immediately jump to that location. Otherwise, the user must click on the slider tick and drag it.
Return Value
<node3d:GUI:slider> object
Example
slider = viz.addSlider()
slider.setPosition([.5,.5,0])
See also