Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All my buttons press themselves once on startup #169

Open
JacksonRFilms opened this issue Apr 7, 2021 · 1 comment
Open

All my buttons press themselves once on startup #169

JacksonRFilms opened this issue Apr 7, 2021 · 1 comment

Comments

@JacksonRFilms
Copy link

I have some buttons in my sketch that perform functions like saving a frame, getting a new random seed, and one that cycles thru 5 different "render qualities" and saves each one as a frame. The problem is, as soon as I run the sketch, all the buttons immediately activate and call all of their functions without me pressing any of them! here is the code i used to create the buttons:

cp5.addButton("New_seed")
.setValue(0)
.setPosition(50, 100)
.setSize(200, 19)
;

cp5.addButton("Save_frame")
.setValue(0)
.setPosition(50, 120)
.setSize(200, 19)
;

cp5.addButton("Render_all")
.setValue(0)
.setPosition(50, 140)
.setSize(200, 19)
;

@eagleaspen
Copy link

Try taking out the .setValue(0) line. I had the same problem and this fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants