WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-14-2012, 05:17 AM
new_horizon new_horizon is offline
Member
 
Join Date: Apr 2010
Posts: 43
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
Reply With Quote
  #2  
Old 05-14-2012, 06:48 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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 )
Reply With Quote
  #3  
Old 05-14-2012, 07:30 AM
new_horizon new_horizon is offline
Member
 
Join Date: Apr 2010
Posts: 43
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
Reply With Quote
  #4  
Old 05-16-2012, 07:32 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
I'm not sure I understand the question. Can you post some example code that shows what you are trying to do?
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 05:37 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC