diff --git a/libraries/p5.gui.js b/libraries/p5.gui.js index c758c2c..1a2efaf 100644 --- a/libraries/p5.gui.js +++ b/libraries/p5.gui.js @@ -165,6 +165,10 @@ var val = object[arg]; var typ = typeof val; + if(typeof arg === 'function') { + typ = typeof arg + } + //console.log(typ, arg, val); // don't need to show the sliders for range min, max and step of a property @@ -227,6 +231,10 @@ this.bindBoolean(arg, object[arg], object); break; + case 'function': + this.addButton(arg.name, arg); + break; + } } };