I am using p5.gui with QuickSettings in many of my OpenProcessing sketches. If you are interested, look for sketches 743514 and 743509, in which I use p5.GUI sliders to set hue, saturation and brightness for fullscreen gradients. It is a great timesaver. I agree with the idea that it would be nice to have a button element included. Up until now I have used checkboxes as buttons, but I am looking forward to using a user solution posted in Issues. I reread the p5.GUI information page several times to find out how to position a GUI, and tried the code suggested there:
Thanks.. did search from readme/documentation on move the GUI on the first run land me here. I use:
gui = createGui('name of my GUI');gui.setPosition(50,50);
I am using p5.gui with QuickSettings in many of my OpenProcessing sketches. If you are interested, look for sketches 743514 and 743509, in which I use p5.GUI sliders to set hue, saturation and brightness for fullscreen gradients. It is a great timesaver. I agree with the idea that it would be nice to have a button element included. Up until now I have used checkboxes as buttons, but I am looking forward to using a user solution posted in Issues. I reread the p5.GUI information page several times to find out how to position a GUI, and tried the code suggested there:
let gui1 = p.createGui('My 1st GUI'); gui1.moveTo(50, 50); gui1.addGlobals('a', 'b', 'c');
It would not work. The console error was: TypeError: gui.moveTo is not a function. (In 'gui.moveTo(50, 50)', 'gui.moveTo' is undefined)
Then I happened to notice a different positioning method shown in one of the examples.
gui = createGui('p5.GUI').setPosition(width - 250, 120);
That one works perfectly, so I suggest using it, and error-checking the other method.