rocinantealpha

reference / interface

toggle

A check box in a ui block that is true while it is ticked: trails = toggle "trails". It starts off, or as start says, and keeps its value as the sketch reloads.

big = falseui [ big = toggle "big" ]draw [  if big [ circle at 200 150 radius 80 ] else [ circle at 200 150 radius 40 ]]
what it draws: the whole window, 400 by 300
What the example of toggle draws

How to write it

toggle text [start true or false] [at number number] [width number]

Gives true or false.

Related