rocinantealpha

reference / interface

knob

A round dial in a ui block that gives its number between a low and a high: speed = knob "speed" 0 1. Drag it up or to the right to turn it up, or use the arrow keys when it has focus. It starts at the low end, or at start, and keeps its value as the sketch reloads.

turns = 0ui [ turns = knob "turns" 0 10 start 3 ]draw [  for i from 1 to turns [    circle at (i * 30) 160 radius 10  ]]
what it draws: the whole window, 400 by 300
What the example of knob draws

How to write it

knob text low high [start number] [at number number] [width number]

Gives a number.

Related