ControlP5 button callback runs on program launch without mouse click.
in
Contributed Library Questions
•
16 days ago
I am working on a program in processing in which the user needs to enter text into a text field and click a submit button to proceed. When the submit button is pressed the text field and button are removed.
The problem that I am having is that when I launch the program the button's callback is being run without the button being pressed and removing the elements before the user has a chance to interact with them.
I could do some hacked if statement with a flag to make it ignore the first call, but I would rather it not get called at the beginning at all. Any suggestions?
The problem that I am having is that when I launch the program the button's callback is being run without the button being pressed and removing the elements before the user has a chance to interact with them.
I could do some hacked if statement with a flag to make it ignore the first call, but I would rather it not get called at the beginning at all. Any suggestions?
1