Alan’s button example

Please upgrade your browser to something new like Google Chrome.

//Made with ProcessingLyon Tumblrify:
//http://p5lyon.tumblr.com/ProcessingJSTumblr
//English Version:
//http://p5lyon.tumblr.com/ProcessingJSTumblrEn

void setup() {
size(400, 400);
noStroke();
background(250,250,250);
}

void draw() { //hover
rect(20, 300, 120, 50, 10);
if(mouseX > 20 & mouseX 300 & mouseY 20 & mouseX 300 & mouseY < 350) {
background(0,0,250);
fill(255,255,0);
ellipse(250, 250, 200,200)
fill(0,0,0);
ellipse(230, 230, 10,10)
fill(0,0,0);
ellipse(260, 230, 10,10)
bezier(200, 260, 200, 330, 300, 330, 300, 260);
} else {
background(250,250,250);
}

}

Alan Proctor-Thomson

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.