bitcraftlab / p5.gui

p5.gui magically generates a graphical user interface for your p5.js sketches
https://bitcraftlab.github.io/p5.gui
MIT License
357 stars 91 forks source link

addButton & setRangeValue functions #9

Open kabrio opened 7 years ago

kabrio commented 7 years ago

Just a simple wrapper around quicksettings to be able to add buttons by calling addButton(title, function). Also wrapped setRangeValue function from quicksettings to enable scripted value changes of sliders. See button-setRangeValue example for demonstration.

micahwalter commented 6 years ago

Would be nice to see this merged...

craftoid commented 5 years ago

Hey @kabrio —thanks for your pull request, I finally got back to work on p5.gui. I have rewritten it quite a bit, but I will try to incorporate your suggestions / changes.

craftoid commented 5 years ago
  1. Adding Buttons and HTML is definitely on my list... But I'd rather create those auto-magically from functions and DOM elements.
  2. In general p5.gui should magically reflect changes of the variables passed to it.
    So rather than scripting changes to the GUI, the gui should watch the variables and update accordingly...
  3. I like your randomize example a lot 👍
    I will adapt it to fit the approach outlined above

Thanks for your contribution, and sorry for the long delay!