xxxxxxxxxx
let oops;
let bg;
let emotion;
let ums;
let input, button;
let thestring;
function setup() {
oops = loadFont('oops.ttf');
bg = loadImage('bg.jpeg');
createCanvas(1440, 900);
emotion = loadFont('emotion.ttf');
ums = loadFont('ums.ttf');
input = createInput();
input.position(640, 500);
button = createButton('submit');
button.position(780,500, 200);
button.mousePressed(testing);
textAlign(CENTER);
textSize(50);
}
function testing() {
thestring = input.value();
input.value('');
}
function preload(){
album1=loadImage("album1.png");
}
function draw() {
background(bg);
textSize(100);
if(key==='1'){
background(bg);
value = 0;
textFont(oops);
textSize(100);
thestring = "oops i did it again";
fill("palegoldenrod");
stroke("purple");
strokeWeight(10);
} if (key === '2') {
background(bg);
textFont(ums);
fill(168,46,49);
noStroke();
thestring = "Under My Skin";
} if (key === '3') {
background(bg);
textFont(emotion);
fill(78,186,223);
noStroke();
thestring = "EMOTION";
}
text(thestring,mouseX,mouseY);
}