ok i just deleted the background and it works!
heres the new one:
float bx;
float bl;
float bly;
float by;
float rx;
float ry;
int bs = 10;
int bu = 10;
int re = 10;
boolean bover = false;
boolean locked = false;
float bdifx = 0.0;
float bdify = 0.0;
int x = 30;
PFont fontA;
void setup()
{
size(200, 200);
bx = 10;
by = 10;
bl = 10;
bly = 50;
rx = 10;
ry = 90;
rectMode(RADIUS);
fontA = loadFont("AgencyFB-Reg-48.vlw");
textFont(fontA, 32);
}
void draw()
{
if (mouseX > bx-bs && mouseX < bx+bs &&
mouseY > by-bs && mouseY < by+bs) {
bover = true;
if(!locked) {
fill(39,232,30);
fill(96,245,8);
text("Green!", 50, 25);
}
} else {
fill(206,204,204);
text("Green!", 50, 25);
stroke(153);
fill(96,245,8);
bover = false;
}
rect(bx, by, bs, bs);
fill(17,40,234);
rect(bl,bly,bs,bs);
fill(247,7,17);
rect(rx,ry,bs,bs);
}
//fill(247,7,17);
//text("RED!", 50, 99);
//fill(17,40,234);
//text("BLUE!", 50, 60 );
when you hover over the green box it says green,but when i try to do the same action to the blue box and red box,
it doesn't work. how can you do this? do you just do:
if (mouseX > bx-bs && mouseX < bx+bs &&
mouseY > by-bs && mouseY < by+bs) {
bover = true;
if(!locked) {
except by changing the integers for the blue box? Or is it another way?