Sorry all for the dumb newbie question (see excuses below)…
The subject line really says it all.
Simply: How do I change the default range for a slider?
Excuses: Old C programmer, managed to avoid OO til now, new to Panda3D, Python. Lotsa learning to do!!!
zpavlov
November 14, 2005, 7:30pm
2
check out
http://panda3d.org/manual/index.php/DirectSlider
They list range as the option to set when you declare the bar.
ie:
myBar=DirectSlider(range=(1,10))
zpavlov et.al.,
Here is my code:
self.sliderX = DirectSliderBar(pos = Vec3(0,0,0.7), value = .50,
range=(1,10), command = self.PanX)
I get the following error:
TypeError: bad argument type for built in operation.
I remove the range option and I do not get the error.
Any hints?
zpavlov
November 14, 2005, 8:39pm
4
oops, the new panda uses a range tuple, but 1.0.5 has range as a multiplier on 0 to 1. So, range=10 will give you values from 0 to 10. From there, your slider callback can add an offset if you need it.