Panda3D Manual: DirectSliderUse a DirectSlider to make a slider, a widget that allows the user to select a value between a bounded interval. DirectSlider is available beginning in Panda3D 1.1. A DirectSlider consists of a long bar, by default horizontal, along with a "thumb", which is a special button that the user may move left or right along the bar. The normal DirectGui parameters such as frameSize, geom, and relief control the look of the bar; to control the look of the thumb, prefix each of these parameters with the prefix "thumb_", e.g. If you want to get (or modify) the current value of the slider (by default, the range is between 0 and 1), use
Exampleimport direct.directbase.DirectStart "range" sets values between 0 and 100 "value" sets initial value to 50 "pageSize" sets the step between mouseclicks to 3 (approximately) "command" calls the showValue-function implemented above © Carnegie Mellon University 2010 |