reuse functionality at top level
in
Programming Questions
•
2 months ago
Hi!
I couldn't find an answer to this.
Let's suppose I want to do always the same things inside of my keyPressed handler and, therefore, I want to share the code inside of the handler among sketches:
void keyPressed() {
if (keyCode==32) {
//do always same stuff
}
}
what would be the best way do do this? create a class with a static method an put it inside of the libraries folder?
thanks a lot in advance!
1