Quote:[font=Lucida Sans]
//Diabetic Rabbits Scribbler - First Version, Basic
This is my first attempt at making a drawing application.
Remember that i've just started proccessing so critisise accordingly.
No criticism at all. It was lots of fun....
I would like for you to consider all the if statements....bet that was confusing for you to write.
To simplify all that try the switch()/case statements.
Code:
switch(key){
case 'x':
case 'X'://black
fill(0, 0, 0);
break;
case 'r':
case 'R': //red
fill(255, 0, 0);
break;
case 'b':
case 'B'://blue
fill(0, 0, 255);
break;
case 'y':
case 'Y'://yellow
fill(255, 255, 0);
break;
case 'g':
case 'G'://green
fill(38, 127, 0);
break;
case 'w':
case 'W'://white
fill(255, 255, 255);
break;
}
I changed your choice of letters for the colors....I'm English speaking and it helped me to pick the right colors.
You could take the key to upper/lower case and only use one case per key press instead of using two cases per choice.
Hope you continue with this and make a nice drawing program.
So, yeah, what's "kid pix"?