Help with using input values with variables along with if, else if code

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);