We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've seen that some other users have had issues with the controlP5 button controllers firing on app launch. My controller seems to be firing all the time, even if I use a flag to prevent the function from running on the first call. Here's my code:
void draw_start_screen() { cp5 = new ControlP5(this); cp5.addButton("buttonA") .setValue(0) .setPosition(W/2,H/2) .setSize(100,100); } void buttonA(int theValue) { if (firstLoop) { firstLoop = false; } println(theValue); }
When I run my app, it continuously prints 0 to the console. Does anyone have a solution to this issue?
Answers
Can you post an MCVE?