I have a error it looks like you are mixing active and static modes can you help me
My code:
String input = "";
float input1 = 0;
float input2 = 0;
float result = 0;
int operator = 0;
boolean drawResult = false;
void setup() {
background(255);
size(720, 1280);
fill(95, 158, 160);
rect(0, height/5, width, height*4/5);
textSize(height/10);
frameRate(90);
fill(255);
text("1", 30, height/5*1.7);
text("2", 30+175, height/5*1.7);
text("3", 30+175+175, height/5*1.7);
text("+", 30+175+175+175, height/5*1.7);
text("4", 30, height/5*2.7);
text("5", 30+175, height/5*2.7);
text("6", 30+175+175, height/5*2.7);
text("-", 30+175+175+175, height/5*2.7);
text("7", 30, height/5*3.7);
text("8", 30+175, height/5*3.7);
text("9", 30+175+175, height/5*3.7);
text("x", 30+175+175+175, height/5*3.7);
text("C", 30, height/5*4.7);
text("0", 30+175, height/5*4.7);
text("=", 30+175+175, height/5*4.7);
text("/", 30+175+175+175, height/5*4.7);
}
void draw() { //ekran
fill(255);
rect(0, 0, width, height/5);
fill(220, 20, 60);
if (drawResult) {
text(nfc(result,3), 30, 150);
} else {
text(input, 30, 150);
}
}
void mousePressed() {
if (mouseX >= 0 && mouseX <= 175 && mouseY >= height/4 && mouseY<= height/4+255 ) {
input = input +1;
drawResult = false;
} else if (mouseX >= 175 && mouseX <= 0+175+175 && mouseY >= height/4 && mouseY<= height/4+255) {
input = input +2;
drawResult = false;
} else if (mouseX >= 0+175+175 && mouseX <= 0+175+175+175 && mouseY >= height/4 && mouseY<= height/4+255) {
input = input +3;
drawResult = false;
} else if (mouseX >= 0+175+175+175 && mouseX <= 0+175+175+175+175 && mouseY >= height/4 && mouseY<= height/4+255) {
println("+");
drawResult = false;
input1 = parseInt(input);
input = "+";
operator = 1;
//noStroke();
//fill(255);
//rect(0, 0, width, height/4);
// rad 2
} else if (mouseX >= 0 && mouseX <= 175 && mouseY >= height/4+255 && mouseY<= height/4+255+255) {
input = input +4;
drawResult = false;
} else if (mouseX >=175 && mouseX <= 175+175 && mouseY >= height/4+255 && mouseY<= height/4+255+255 ) {
input = input +5;
drawResult = false;
} else if (mouseX >= 175+175 && mouseX <= 175+175+175&& mouseY >= height/4+255 && mouseY<= height/4+255+255 ) {
input = input +6;
drawResult = false;
} else if (mouseX >= 175+175+175 && mouseX <= 175+175+175+175&& mouseY >= height/4+255 && mouseY<= height/4+255+255 ) {
println("-");
drawResult = false;
input1 = parseInt(input);
input = "-";
//fill(255);
//rect(0, 0, 667, 212);
//input = input + "-";
operator = 2;
//rad 3
} else if (mouseX >= 0 && mouseX <= 175&& mouseY >= height/4+255+255 && mouseY<= height/4+255+255+255 ) {
input = input +7;
drawResult = false;
} else if (mouseX >= 175 && mouseX <= 175+175 && mouseY >= height/4+255+255 && mouseY<= height/4+255+255+255 ) {
input = input +8;
drawResult = false;
} else if (mouseX >= 175+175 && mouseX <= 175+175+175 && mouseY >= height/4+255+255&& mouseY<= height/4+255+255+255 ) {
input = input +9;
drawResult = false;
} else if (mouseX >= 175+175+175 && mouseX <= 175+175+175+175 && mouseY >= height/4+255+255 && mouseY<= height/4+255+255+255 ) {
println("x");
drawResult = false;
input1 = parseInt(input);
input = "x";
//fill(255);
//rect(0, 0, 667, 212);
operator = 3;
//rad 4
} else if (mouseX >= 0 && mouseX <= 0+175 && mouseY >= height/4+255+255+255 && mouseY<= height/4+255+255+255+255+255 ) {
println("C");
drawResult = false;
input = "";
input1 = 0;
input2 = 0;
operator = 0;
//fill(255);
//rect(0, 0, 665, 200);
} else if (mouseX >= 175 && mouseX <= 175+175 && mouseY >= height/4+255+255+255&& mouseY<= height/4+255+255+255+255+255) {
input = input +0;
} else if (mouseX >= 175+175 && mouseX <= 175+175+175 && mouseY >= height/4+255+255+255 && mouseY<= height/4+255+255+255+255+255 ) {
println("=");
input2 = parseInt(input.substring(1)); //.substring(1) removes 1 symbol from the text
input = input + "=";
}
else if (mouseX >= 175+175+175 && mouseX <= 175+175+175+175 && mouseY >= height/4+255+255+255 && mouseY<= height/4+255+255+255+255+255 ) {
println("/");
drawResult =false;
input1= parseInt(input.substring(1));
input = "/";
input = input + "";
operator = 4;
}
//fill(255);
//rect(0, 0, 900, 300);
//fill(220,20,60);
if (operator == 1) {
result = input1 + input2;
} else if (operator == 2) {
result = input1 - input2;
} else if (operator == 3) {
result = input1 * input2;
} else if (operator == 4) {
result = input1 / input2;
}
drawResult = true;
input = "";
input1 = 0;
input2 = 0;
operator = 0;
}
println(input);
}