Estoy tratando no solo de cambiar el color de mi botón, sino también de poder llamar a una función onClick() que lo vincule a la siguiente GUI. ¿Cómo hago esto? Estoy usando p5 como mi IDE.
//Load the GUI let img; function preload() { img = loadImage('assets/main_menu.PNG'); } //Call the GUI function setup() { createCanvas(img.width, img.height); img.resize(img.width, img.height) image(img, 0, 0); } //Button 1 let button; function draw() { image(img, 0, 0); button = createButton('Type Planet!'); button.position(100, 855); button.size(200,50); button.color('red'); }