xxxxxxxxxx
18
function setup() {
createCanvas(400, 400);
rectMode(CORNER);
}
function draw() {
background(220);
if (mouseX >= 150 && mouseX <= 150+100 && mouseY >= 150 && mouseY <= 150+100) {
//if we've rolled over do something
fill(0);
} else {
fill(255);
}
rect(150,150,100,100);
}