add key_action

This commit is contained in:
2023-10-09 08:25:40 +02:00
parent f933a9f7fe
commit ee50fc0348
3 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
int bg = 200;//bg = background
void draw() {
background(bg);
rectMode(CENTER);
rect(50, 50, 40, 40);
}
void keyPressed() {
bg = 0;
}
void mousePressed() {
bg = 255;
}