// q: 34 and Overweight?
// r: Y
// a: Try this INCREDIBLE and safe colon cleansing formula!
// q: 34 and Overweight?
// r: N
// a: Improve your skin with Zestful Anti Age Cream!
int mode = '1';
PFont mainFont;
String question = "34 and Overweight?";
String info = "Type Y or N";
String letters = "";
void setup() {
size(400,400);
mainFont = loadFont("arial48.vlw");
textFont(mainFont);
textAlign(CENTER);
smooth();
noStroke();
}
void draw () {
background(50);
if (mode == '1') {
textSize(30);
text(question, 61, 90, 279, 100);
rect(153, 275, 94, 2);
textSize(45);
text(letters, 200, 260);
textSize(11);
text(info, 172, 283, 55, 11);
// mode Y
} else if (mode == 'y') {
background(255);
fill(0);
textSize(30);
text(question, 61, 90, 279, 120);
question = "Try this INCREDIBLE and safe colon cleansing formula!";
textSize(12);
// mode N
} else if (mode == 'n') {
background(255);
fill(0);
textSize(30);
text(question, 61, 90, 279, 120);
question = "Improve your skin with Zestful Anti Age Cream!";
textSize(15);
}
}
void keyPressed() {
if ((key == ENTER) || (key == RETURN)) {
letters = letters.toLowerCase();
if (letters.equals("y")) {
mode = 'y';
} else if (letters.equals("n")) {
mode = 'n';
}
letters = "";
} else if (key==BACKSPACE) {
if(letters.length()>0) {
letters = letters.substring(0, letters.length()-1);
}
} else if ((key > 31) && (key != CODED)) {
letters = letters + key;
}
}Scott - G
on Wednesday, Oct 22, 2008 – 3:17 am