def setup
@radio = createRadio
@radio.option('black')
@radio.option('white')
@radio.option('gray')
@radio.style('width', '80px')
textAlign(CENTER)
fill(255, 0, 0)
end
def draw
val = @radio.value
background(val)
text(val, width / 2, height / 2)
end
def setup
@radio = createRadio
@radio.option(10, 'apple')
@radio.option(20, 'bread')
@radio.option(30, 'juice')
@radio.style('width', '80px')
textAlign(CENTER)
end
def draw
background(200)
val = @radio.value
if val
text('item cost is $' + val, width / 2, height / 2)
end
end