View Single Post
  #2  
Old 07-15-2014, 05:12 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Vizconfig panels support text boxes that filter for float or int values. Would this work for you?

Code:
''' 
Press F12 to toggle the visibility
of the configuration window 
''' 

import viz
import vizconfig
import vizinfo

viz.setMultiSample(4)
viz.fov(60)
viz.go()

vizinfo.InfoPanel()

gallery = viz.add('gallery.osgb')

value = 25.0

def getValue():
	return value
	
def setValue(v):
	value=v
	
#Create a configurable object
bc= vizconfig.BasicConfigurable('Enter a float value between (-50,50)')
bc.addFloatItem('float value',range=(-50,50),fset=setValue,fget=getValue)

#register the object so it will display in the configuration window
vizconfig.register(bc)
Reply With Quote