Hey, I tride to copy a code from p5 preferences to make a button. I got some error saying some of the codewords were missing. Im wondering if there is some library or language I’m missing.
var button
function setup() {
  createCanvas(300,400)
}
function draw() {
  background(155)
  button1 = createButton('1')
  button.position (20,300)
  button.mousePressed(background(255,0,0))
}
also, if you know any other ways to make a button, I would be happy to hear about them:)