Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

glgui-numberwheel creates a horizontal oriented number wheel widget. steps can be a list specifying strings to be drawn on the wheel or textures to be displayed on the wheel (for using icons). Also see (glgui-verticalnumberwheel) for the vertical version.

Parameter Description
g Graphical User Interface (GUI) for this widget
x Lower left corner along the x-axis in pixels
y Lower left corner along the y-axis in pixels
w Width of the element in pixels
h Height of the element in pixels
vmin The minimum value in the number wheel. If steps is a list of strings or textures, this parameter is not used.
vmax The maximum value in the number wheel. If steps is a list of strings or textures, this parameter is not used.
icon Icon pixmap for the number wheel (to the left of the wheel)
coloricon Color for the number wheel icon image
colorvalue Color of the selected value in the wheel
colorshade Wheel background color shade
font1 Font for the larger selected value
font2 Font for the smaller unselected values
icon2 Second icon pixmap for the number wheel (to the right of the wheel)
steps Optional: Step size or values of steps, this is the step-size between adjacent values in the wheel, OR this is a list specifying strings to be drawn on the wheel or textures to be displayed on the wheel (for using icons).

Example

Example1: Create a number wheel in @code{gui} with x=50, y=50, width=160, and height=30. The number wheel should range from 1 - 10.

(set! num.txt (list "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"))
(glgui-numberwheel gui 50 50 160 30 1 10 
  #f White Black (color-shade White 0.5) 
  num_32.fnt num_24.fnt #f num.txt)
Clone this wiki locally