I’m completely new to processing, i’m making a calculator. Please help me!
boolean selected = false;
float x;
float y; {
x = 0;
y = 0; }
void setup() {
smooth(8);
size(350,450);
selected = true;
}
void draw() {
noStroke();
noLoop();
background(0);
fill(181,183,183);
ellipse(50,160,50,50);
ellipse(125,160,50,50);
ellipse(200,160,50,50);
fill(255,142,0);
ellipse(275,160,50,50);
fill(32,30,28);
ellipse(50,235,50,50);
fill(32,30,28);
ellipse(125,235,50,50);
fill(32,30,28);
ellipse(200,235,50,50);
fill(255,142,0);
ellipse(275,235,50,50);
fill(32,30,28);
ellipse(50,310,50,50);
fill(32,30,28);
ellipse(125,310,50,50);
fill(32,30,28);
ellipse(200,310,50,50);
fill(255,142,0);//259
ellipse(275,310,50,50);
fill(32,30,28);
ellipse(50,385,50,50);
fill(32,30,28);
rect(50,360,75,50);
fill(32,30,28);
ellipse(125,385,50,50);
fill(255,142,0);
ellipse(201,385,50,50);
fill(255,142,0);
ellipse(276,385,50,50);
fill(0);
text("NO_INPUT",65646,787867569);
textSize(30);
fill(0);
text("7",41,173);
textSize(30);
fill(0);
text("8",116,173);
textSize(30);
fill(0);
text("9",191,173);
textSize(30);
fill(255);
text("/",266,173);
textSize(30);
fill(255);
text("4", 41,248);
textSize(30);
fill(255);
text("5", 116,248);
textSize(30);
fill(255);
text("6", 191,248);
textSize(30);
fill(255);
text("X", 266,248);
textSize(30);
fill(255);
text("1", 41,323);
textSize(30);
fill(255);
text("2", 116,323);
textSize(30);
fill(255);
text("3", 191,323); //305
textSize(30);
fill(255);
text("-", 266,323);
textSize(30);
fill(255);
text("0", 41,398);
textSize(30);
fill(255);
text("+", 191,398);
textSize(30);
fill(255);
text("=", 266,398); //16,18
textSize(30);
}
void mousePressed() {
if(mousePressed) {
if(mouseX > 250 && mouseY > 380) {
print("=");
}
if(mousePressed) {
if(mouseX > 175 && mouseY > 380) {
print("+"); }
if(mousePressed) {
if(mouseX > 25 && mouseY > 380) {
print("0");
}
if(mousePressed) {
if(mouseX > 250 && mouseY > 305) {
print("-");
String data = "-";
print(x - y);}
if(mousePressed) {
if(mouseX > 175 && mouseY > 305) {
print("3");
float x = 3;
}
if(mousePressed) {
if(mouseX > 125 && mouseY > 305) {
print("2");
float x = x + 2;
}
if(mousePressed) {
if(mouseX > 25 && mouseY > 305) {
print("1");
float x = x + 1;
selected = true;
if(mousePressed) {
if(mouseX > 25 && mouseY > 305) {
if(selected = true) {
float y = y + 1;}
}
}
}
}}}}}}}}