boolean faux_isAnyButtonPressed(){ // this function is to be replaced by a function set up for the hardware. // this function will turn on power to all buttons // then check the button input pin // and return true if the input pin is on. boolean yes = false; if(mousePressed){ int i = 0; while (i < on.length && !yes){ float dx = mouseX - nodes[i].p.x; float dy = mouseY - nodes[i].p.y; float d2 = sq(dx) + sq(dy); if(d2 <= r2){ yes = true; } i++; } } return yes; } boolean faux_isAButtonOnInRange(int start, int end){ boolean yes = false; if(mousePressed){ int i = start; while (i < on.length && i < end && !yes){ float dx = mouseX - nodes[i].p.x; float dy = mouseY - nodes[i].p.y; float d2 = sq(dx) + sq(dy); if(d2 <= r2){ yes = true; } i++; } } return yes; }