controlP5 - can i still use mousePressed() and keyPressed() ?
in
Contributed Library Questions
•
2 years ago
Hello !
I just discovered controlP5, which is really wonderful. But I'm having some trouble with it.
How is it possible to use that library and still use mousePressed() and keyPressed() for other actions ?
In my applet, I use mousePressed() to draw shapes on the screen. I would like to use
controlP5 to define some parameters of the shapes. But when I click on the
controlP5 buttons, mousePressed() is fired, and a shape is drawn under the button.
Is there a way NOT to trigger mousePressed() when the mouse was actually pressed on a button ? Or how would I do this ? (maybe not use mousePressed(), but a
controlP5's method instead ?)
Of course, the same applies for keyPressed(), which should not be triggered when I'm typing in a
controlP5 field.
Many thanks in advance for any advice !
Olivier
1