Reference.MouseReleased History

Hide minor edits - Show changes to markup

October 20, 2012, at 04:32 PM by Scott Fitzgerald -
Changed lines 26-28 from:

// This function intercepts mouse button release void mouseReleased() {

  Serial.print("Released: ");
to:

boolean left = false; boolean middle = false; boolean right = false;

void mousePressed() {

Changed line 32 from:
    Serial.print("L");
to:
    left = true;
Changed line 34 from:
    Serial.print("M");
to:
    middle = true;
Changed lines 36-37 from:
    Serial.print("R");
  Serial.println();
to:
    right = true;
Added lines 39-56:

// This function intercepts mouse button release void mouseReleased() {

  Serial.print("Released: ");
  if (!mouse.getButton(LEFT_BUTTON) && left==true) {
    Serial.print("L");
    left = false;
  }
  if (!mouse.getButton(MIDDLE_BUTTON) && middle==true) {
    Serial.print("M");
    middle = false;
  }
  if (!mouse.getButton(RIGHT_BUTTON) && right==true) {
    Serial.print("R");
    right = false;
  }
  Serial.println();

}

October 16, 2012, at 08:51 PM by Scott Fitzgerald -
Changed line 48 from:

Functions

to:

See Also

October 16, 2012, at 08:30 PM by Scott Fitzgerald -
Added lines 1-56:

Share