I have:
void setup() {
size(1250,800);
}
and I would like my button:
rect(495,500,260,260,35);
to be placed in the middle of the screen.
So I thought I could make a button
rect(button2X, buttonY, buttonSize, buttonSize, 35);
with:
int buttonSize = 260;
int buttonY = 500;
int button2X = width/2-(buttonSize/2);
but when I play the code, It looks like this:
PS. it’s the one on the far left, that is supposed to be in the middle like this: