I cant seem to get this sketch to display anything. when I remove the this.setup and this.draw functions an image appears but i need it to loop as it does in draw. I’m using scene manager
var pages;
let gui;
let afterFive;
let afterNoon;
let beforeFive
function setup() {
createCanvas(400, 800);
pages = new SceneManager();
gui = createGui();
pages.addScene(Page1);
pages.addScene(Page2);
pages.addScene(Page3);
pages.addScene(Page4);
pages.addScene(Page5);
}
function draw() {
pages.draw();
}
function Page1() {
this.setup = function() {
gui.setTextSize(40);
beforeFive = createButton(“before 5 am”, 75, 250, 250, 60);
afterFive = createButton(“After 5 am”, 75, 380, 250, 60);
afterNoon = createButton(“After 12 pm”, 75, 510, 250, 60);
}
this.draw = function() {
background(220);
drawGui();
textSize(25);
text(‘What time do you plan on ariving?’, 12, 100, 390, 400);
if (afterFive.isPressed) {
print(afterFive.label + " is pressed.");
}
}
}
function Page2() {
}
function Page3() {
}
function Page4() {
}
function Page5() {
}