I think here:
you tell the button which function to run
in the reference it’s
button.mousePressed(changeBG);
you could say
button.mousePressed(handleInput);
I think here:
you tell the button which function to run
in the reference it’s
button.mousePressed(changeBG);
you could say
button.mousePressed(handleInput);