xxxxxxxxxx
118
let radio;
let positive;
let negative;
let neither;
let val;
function setup() {
createCanvas(600, 400);
background(255);
strokeWeight(0);
textSize(18);
textStyle(BOLD);
// val = 1;
}
function draw() {
text('In general, how was your day today?',10,25);
radio = createRadio();
radio.option(1, 'Good Day');
radio.option(2, 'Bad Day');
radio.option(3, 'Neither');
radio.style('width', '400px');
// if (val == 1) {
// console.log('positive');
// text('How are you feeling right now?', 10, 50);
// positive = createRadio();
// positive.option(1,'Accepted/Valued');
// positive.option(2,'Loving');
// positive.option(3,'Excited');
// positive.option(4,'Interested');
// positive.option(5,'Confident');
// positive.option(6,'Happy');
// positive.style('width', '600px');
// } else if (val == 2) {
// console.log('negative');
// text('How are you feeling right now?', 10, 70);
// negative = createRadio();
// negative.option(1,'Afraid');
// negative.option(2,'Sad');
// negative.option(3,'Dislike');
// negative.option(4,'Alone');
// negative.option(5,'Angry');
// negative.option(6,'Embarrassed');
// } else {
// console.log('neither');
// text('How are you feeling right now?', 10, 90);
// neither = createRadio();
// neither.option(1,'Indifferent/Apathetic');
// neither.option(2,'Bored');
// neither.option(3,'Numb/Empty');
// neither.option(4,'Withdrawn/Distant');
// }
}
// let goodbutton, badbutton, mehbutton;
// let checkboxaccepted, checkboxloving, checkboxexcited, checkboxinterested, checkboxconfident;
// let one, two;
// let good=false;
// let bad=false;
// let neither = false;
// function setup() {
// createCanvas(400, 400);
// background(255);
// goodbutton = createButton('Good Day');
// goodbutton.position(10,10);
// goodbutton.mousePressed(changeBG1);
// badbutton = createButton('Bad Day');
// badbutton.position(100,10);
// badbutton.mousePressed(changeBG2);
// mehbutton = createButton('Neither');
// mehbutton.position(180,10);
// mehbutton.mousePressed(changeBG3);
// // checkboxaccepted.changed(myCheckedEvent);
// }
// function changeBG1() {
// background(0,255,0);
// good = true;
// one = createButton('Good Day');
// one.position(10,200);
// one.mousePressed(changeBG1);
// two = createButton('Bad Day');
// two.position(10,220);
// two.mousePressed(changeBG2);
// }
// function changeBG2() {
// background(255,0,0);
// bad = true;
// }
// function changeBG3() {
// background(150);
// neighther = true;
// }
// function draw() {
// // if (good==true && angry==false) {
// // fill(red);
// // }
// }