#1
|
|||
|
|||
Slider Assistance
Hi All,
I'm currently working on incorporating a slider into my work. A few questions... 1) Is there a way of labelling different areas of the slider for the user? I have already specified the different intervals in the code. 2) Is there a way of outputing the slider value from the code? So in trial 1 for instance, where did the user move the slider to when prompted. Thanks |
#2
|
|||
|
|||
1) Do you want labels above or below the slider? If so, you can create text objects and position them at those intervals.
2)Register a callback function for the slider event using vizact.onslider: Code:
import viz viz.go() slider = viz.addSlider(pos=[0.5,0.5,0]) def sliderChanged( pos ): print pos vizact.onslider( slider, sliderChanged ) |
#3
|
|||
|
|||
Hi Jeff,
Thanks for your prompt response. I have been trying this method and it does not seem to allow me to register the slider position as a variable for an output. How can I assign the "pos" value to a variable? For instance, "slidepos"? Thanks |
#4
|
|||
|
|||
I'm not sure I understand the question. Can you post some example code that shows what you are trying to do?
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Detect a double click on a gui slider | Renato Lima | Vizard | 4 | 11-09-2010 02:23 PM |
adding more than 1 action for avatar animation slider control | yak | Vizard | 0 | 07-21-2009 11:22 AM |
help with slider code | yak | Vizard | 2 | 07-20-2009 12:12 PM |
Vizmenu slider bug? | Gladsomebeast | Vizard | 2 | 10-22-2008 08:05 PM |
Blending/Fading 5 Textures with a Slider | south_bank | Vizard | 2 | 05-15-2008 07:59 AM |