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

exposes addButton and setValue #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
this fork brings the addButton function from quickSettings and makes it available using this lib

# p5.gui

![screenshot of p5.gui](p5_gui_screenshot.png)
Expand Down
8 changes: 8 additions & 0 deletions libraries/p5.gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@
qs.bindParams(object, params);
};

this.addButton = function(title, callback){
qs.addButton(title, callback);
}

this.setValue = function(title, value) {
qs.setValue(title, value);
};

// noLoop() to call draw every time the gui changes when we are not looping
this.noLoop = function() {
qs.setGlobalChangeHandler(sketch._draw);
Expand Down