xxxxxxxxxx
53
class Slide{
constructor(qnNum,qnImg,qnOptns,prev=null,next=null){
this.qnNum=qnNum;
this.qnImg=qnImg;
this.qnOptions=qnOptions
this.prev=prev;
this.next=next;
}
show(){
text("question:"+this.qnNum.toString(),10,10);
image(this.qnImg,20,50,300,200);
}
}
let silde;
let q1;
let qo=[]
let radio;
function preload() {
q1=loadImage("school.png");
}
function setup() {
createCanvas(600, 400);
radio = createRadio();
radio.position(100,100);
}
function draw() {
background(100);
slide=new Slide(1,q1)
slide.show();
radio.option("");
image(q1,110,100,30,30);
radio.option("2");
radio.option("3");
radio.option("4");
radio.style('width', '60px');
textAlign(CENTER);
noLoop();
}