rocinantealpha

reference / interface

choice

Radio buttons in a ui block, one for each item of a list of text, that give the item chosen: mode = choice "mode" [ "draw" "erase" ]. It starts on the first item, or on the one start names, and keeps the choice as the sketch reloads.

mode = "draw"ui [ mode = choice "mode" [ "draw" "erase" ] ]draw [ text mode at 40 200 size 32 ]
what it draws: the whole window, 400 by 300
What the example of choice draws

How to write it

choice text items [start text] [at number number] [width number]

Gives text.

Related