class Button{ button(r, g, b, buttonX, buttonY, buttonText) { push() noFill() rectMode(CENTER); rect(buttonX, buttonY, buttonWidth, buttonHeight) textSize(25) fill(r, g, b) textAlign(CENTER); text(buttonText, buttonX, buttonY) pop() } }