void copyFile(String sourceFile, String destFile) { byte[] source = loadBytes(sourceFile); saveBytes(destFile, source); } void introDraw() { ts = 12; textSize(ts); text(loadText_s[0][loadText_s[0].length-1], width/2, height/2); ts = 20; textSize(ts); text(inputName, width/2, height/2+(ts+ts/10)); String dash = "_"; if (second() % 2 != 0) { text(dash, width/2 + textWidth(inputName)/2 + 5, height/2+(ts+ts/10)); } } boolean crit_error; void errorDraw() { fill(255, 0, 0); if (crit_error) text("CRITICAL ERROR", width/2, height/2); else text("ERROR", width/2, height/2); text(error_s, width/2, height/2+(ts+ts/10)); error_i++; if (error_i == 30) { if (crit_error) { exit(); } error_b = false; error_i = 0; fill(255); } } boolean skip; void skip() { skip = true; nextPhase(); } boolean adhover; void ad() { if (mouseX > width-kaff.width && mouseX < width && mouseY > 0 && mouseY < kaff.height) { adhover = true; } else { adhover = false; } } void keyPressed() { if (intro_b) { if (keyCode == BACKSPACE) { if (inputName.length() > 0) { inputName = inputName.substring(0, inputName.length()-1); } } else if (keyCode == DELETE) { inputName = ""; } else if (keyCode != SHIFT && keyCode != RETURN && keyCode != ENTER) { inputName = inputName + key; } if (keyCode == RETURN || keyCode == ENTER) { intro_b = false; } println(inputName); } else if (readPhase_i == 10) { if (keyCode == BACKSPACE) { if (surfaceProp.length() > 0) { surfaceProp = surfaceProp.substring(0, surfaceProp.length()-1); } } else if (keyCode == DELETE) { surfaceProp = ""; } else if (keyCode != SHIFT && keyCode != RETURN && keyCode != ENTER) { surfaceProp = surfaceProp + key; } if (keyCode == RETURN || keyCode == ENTER) { nextPhase(); } } }