diff --git a/README.md b/README.md index a4deb84..dbe3486 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/libraries/p5.gui.js b/libraries/p5.gui.js index c758c2c..bfe73b9 100644 --- a/libraries/p5.gui.js +++ b/libraries/p5.gui.js @@ -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);