Controller 001 alpha : Examples : togglebutton_1
Controller controller;
void setup()
{
size(200, 200);
framerate(25);
controller = new Controller(this, "togglebuttons: 1");
controller.togglebuttons.get(0).setSelected(true);
controller.togglebuttons.get(0).setLegend("how fast can you click?");
}
void loop()
{
background(255);
translate(width / 2, height / 2);
if (controller.togglebuttons.get(0).isSelected())
{
rectMode(CENTER_DIAMETER);
fill(255, 0, 0);
noStroke();
rotate(QUARTER_PI);
rect(0, 0, 160, 40);
rotate(HALF_PI);
rect(0, 0, 160, 40);
}
}
top
|
home
|
bagel papa poule : tookit