Control a button activation using keyboard
in
Contributed Library Questions
•
8 months ago
Hello guys,
Using ControlP5 library, I am trying to control the activation of a button using the keyboard, so when a key is pressed, I want the button to be active.
So I created the object
- ControlP5 myControl;
- // (...)
- myControl = new ControlP5(this);
- myControl.addButton("special button", 1, 100, 200, 100, 200);
and in draw() method I am trying to do like
- if (keyPressed) {
- if (key=='8') myControl.getController("special button").setOn();
- }
However, I receive the message
So, what did I miss?The function setOn() does not exist
Thanks in advance.
1