mirror of
https://github.com/processing/processing4.git
synced 2026-02-13 10:30:44 +01:00
Fix bug preventing first mouse PRESS from setting mouseX/mouseY when sketch window gains focus from the PRESS.
This commit is contained in:
@@ -117,4 +117,33 @@ public class MouseEvent extends Event {
|
||||
// public void setClickCount(int clickCount) {
|
||||
// this.clickCount = clickCount;
|
||||
// }
|
||||
|
||||
private String actionString() {
|
||||
switch (action) {
|
||||
default:
|
||||
return "UNKNOWN";
|
||||
case CLICK:
|
||||
return "CLICK";
|
||||
case DRAG:
|
||||
return "DRAG";
|
||||
case ENTER:
|
||||
return "ENTER";
|
||||
case EXIT:
|
||||
return "EXIT";
|
||||
case MOVE:
|
||||
return "MOVE";
|
||||
case PRESS:
|
||||
return "PRESS";
|
||||
case RELEASE:
|
||||
return "RELEASE";
|
||||
case WHEEL:
|
||||
return "WHEEL";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("<MouseEvent %s@%d,%d count:%d button:%d>",
|
||||
actionString(), x, y, count, button);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user