In the blue processing book there are some classes for a button for example.
Only the press and released code is outside the class code:
void mousePressed() {
button.press();
}
void mouseReleased(){
button.release();
}
is there a good reason for that since it's possilbe to check if the mouse is pressed in the button.update(); with if(mousePressed == true){
so?
Only the press and released code is outside the class code:
void mousePressed() {
button.press();
}
void mouseReleased(){
button.release();
}
is there a good reason for that since it's possilbe to check if the mouse is pressed in the button.update(); with if(mousePressed == true){
so?
1