xxxxxxxxxx
let Event = false;
let EventBrunch = true;
let EventMonday = true;
let EventTuesday = true;
let EventWed = true;
let EventThursday = true;
let EventFriday = true;
let EventSaturday = true;
function setup() {
createCanvas(800, 750); //this is size of the screen
}
function draw() {
background("white"); //this is the color of the background
textSize(20);
textAlign(LEFT);
fill(31, 105, 255);
textFont('Kalam');
textStyle(ITALIC);
text('"Oh no! I over booked myself! Click each event to clear my day."', 250, 30);
// top (dates) horizonal ///////////////////////////////////////////////
noStroke()
textSize(20);
textAlign(CENTER);
fill(96, 96, 96);
textStyle(NORMAL);
textFont('Futura');
text('September 2023', 150, 30); // month and year
textFont('Ariel');
text(' < >', 30, 30);
textSize(12); // SUN
textFont('Futura');
textAlign(CENTER);
fill(160, 160, 160);
text('SUN', 150, 70);
textSize(16);
textAlign(CENTER);
text('17', 150, 90);
textSize(12); // MON
textAlign(CENTER);
fill(31, 105, 255);
text('MON', 250, 70);
textSize(16);
textAlign(CENTER);
fill(31, 105, 255); // todays date circle
ellipseMode(CENTER);
ellipse(250, 85, 25, 25);
fill("white");
text('18', 250, 90);
textSize(12); // TUES
textAlign(CENTER);
fill(128, 128, 128);
text('TUE', 350, 70);
textSize(16);
textAlign(CENTER);
fill(96, 96, 96);
text('19', 350, 90);
textSize(12); // WED
textAlign(CENTER);
fill(128, 128, 128);
text('WED', 450, 70);
textSize(16);
fill(96, 96, 96);
textAlign(CENTER);
text('20', 450, 90);
textSize(12); // THUR
textAlign(CENTER);
fill(128, 128, 128);
text('THUR', 550, 70);
textSize(16);
textAlign(CENTER);
fill(96, 96, 96);
text('21', 550, 90);
textSize(12); // FRI
textAlign(CENTER);
fill(128, 128, 128);
text('FRI', 650, 70);
textSize(16);
textAlign(CENTER);
fill(96, 96, 96);
text('22', 650, 90);
textSize(12); //SAT
textAlign(CENTER);
fill(128, 128, 128);
text('SAT', 750, 70);
textSize(16);
textAlign(CENTER);
fill(96, 96, 96);
text('23', 750, 90);
// vertical times of day /////////////////////////////////////
noStroke()
textSize(10); // times of the day
textAlign(CENTER);
fill(192, 192, 192);
text('8 AM', 25, 105);
textSize(10);
textAlign(CENTER);
text('9 AM', 25, 155);
textSize(10);
textAlign(CENTER);
text('10 AM', 25, 205);
textSize(10);
textAlign(CENTER);
text('11 AM', 25, 255);
textSize(10);
textAlign(CENTER);
text('12 PM', 25, 305);
textSize(10);
textAlign(CENTER);
text('1 PM', 25, 355);
textSize(10);
textAlign(CENTER);
text('2 PM', 25, 405);
textSize(10);
textAlign(CENTER);
text('3 PM', 25, 455);
textSize(10);
textAlign(CENTER);
text('4 PM', 25, 500);
textSize(10);
textAlign(CENTER);
text('5 PM', 25, 550);
textSize(10);
textAlign(CENTER);
text('6 PM', 25, 600);
textSize(10);
textAlign(CENTER);
text('7 PM', 25, 650);
textSize(10);
textAlign(CENTER);
text('7 PM', 25, 650);
textSize(10);
textAlign(CENTER);
text('8 PM', 25, 700);
stroke(192, 192, 192);
line(50, 100, 800, 100); // horizontal lines
line(50, 150, 800, 150);
line(50, 200, 800, 200);
line(50, 250, 800, 250);
line(50, 300, 800, 300);
line(50, 350, 800, 350);
line(50, 400, 800, 400);
line(50, 450, 800, 450);
line(50, 500, 800, 500);
line(50, 550, 800, 550);
line(50, 600, 800, 600);
line(50, 650, 800, 650);
line(50, 650, 800, 650);
line(50, 700, 800, 700);
stroke(192, 192, 192);
line(100, 100, 100, 800); // vertical lines
line(200, 100, 200, 800);
line(300, 100, 300, 800);
line(400, 100, 400, 800);
line(500, 100, 500, 800);
line(600, 100, 600, 800);
line(700, 100, 700, 800);
line(800, 100, 800, 800);
line(900, 100, 900, 800);
//EVENTS!!! ///////////////////////////////////////////////////////////////////
noStroke()
textSize(12); //
textAlign(CENTER);
if (EventSaturday == true) { // SATURDAY EVENTS
fill("pink");
rect(700, 400, 95, 100, 15);
fill("white");
text('Girly pop time', 750, 430);
}
if (EventBrunch == true) { // SUNDAY EVENTS
fill("pink"); // sun
rect(100, 200, 95, 100, 15);
fill("white");
text('Brunch', 150, 230);
}
if (EventMonday == true) { // MONDAY EVENTS
fill(64, 81, 173);
rect(200, 250, 95, 50, 15); // PSYC 313
textAlign(CENTER);
fill("white");
text('PSYC-313', 250, 280);
fill(133, 23, 163); // events
rect(200, 300, 95, 50, 15); // CSC 121
textAlign(CENTER);
fill("white");
text('CSC-121', 250, 330);
fill("pink");
rect(200, 500, 95, 50, 15); // Pilates
textAlign(CENTER);
fill("white");
text('Pilates', 250, 530);
}
//let EventTuesday = true; // TUESDAY EVENTS
if (EventTuesday == true) {
fill(64, 81, 173);
rect(300, 250, 95, 50, 15); // tuesday
textAlign(CENTER);
fill("white");
text('PSYC-240', 355, 280);
fill(64, 81, 173);
rect(300, 550, 95, 150, 15); // tuesday
textAlign(CENTER);
fill("white");
text('PSYC-241', 355, 580);
fill(122, 158, 58);
rect(300, 200, 95, 50, 15); // tuesday
textAlign(CENTER);
fill("white");
text('NSF meeting', 355, 230);
fill(37, 159, 230);
rect(300, 450, 95, 100, 15); // tuesday
textAlign(CENTER);
fill("white");
text('Babysit', 350, 480);
}
if (EventWed == true) { // WEDNESDAY EVENTS
fill("pink"); // wednesday
rect(400, 550, 95, 100, 15);
fill("white");
text('Happy hour', 450, 580);
fill(122, 158, 58); // events
rect(400, 400, 95, 50, 15); // wednesday
textAlign(CENTER);
fill("white");
text('Lab meeting', 450, 430);
fill("Pink"); // events
rect(400, 150, 95, 50, 15); // wednesday
textAlign(CENTER);
fill("white");
text('Pilates', 450, 180);
}
if (EventThursday == true) {// THURSDAY EVENTS
fill(64, 81, 173);
rect(500, 250, 95, 50, 15); // thursday
textAlign(CENTER);
fill("white");
text('PSYC-313', 555, 280);
fill(37, 159, 230); // events
rect(500, 450, 95, 150, 15); // thursday
textAlign(CENTER);
fill("white");
text('Babysit', 555, 500);
fill(133, 23, 163); // events
rect(500, 300, 95, 50, 15); // thurs
textAlign(CENTER);
fill("white");
text('CSC-121', 555, 330);
}
if (EventFriday == true) { // FRIDAY EVENTS
fill(64, 81, 173);
rect(600, 250, 95, 50, 15); // friday
textAlign(CENTER);
fill("white");
text('PSYC-240', 655, 280);
fill(37, 159, 230); // events
rect(600, 450, 95, 150, 15); // friday
textAlign(CENTER);
fill("white");
text('Babysit', 655, 500);
}
}
function mousePressed() {
//rect(100, 200, 95, 100, 15); // SUNDAY CLEAR BRUNCH //
if ((mouseX > 100) && (mouseX < 200) && (mouseY > 200) && (mouseY <= 300)) {
if (EventBrunch == true) {
EventBrunch = false;
} else {
EventBrunch = true;
}
}
//rect(200, 300, 95, 50, 15); // monday; // MONDAY CLEAR COLLUMN // let EventMonday = true;
if ((mouseX > 200) && (mouseX < 300) && (mouseY > 250) && (mouseY <= 550)) {
if (EventMonday == true) {
EventMonday = false;
} else {
EventMonday = true;
}
}
// if (EventTuesday == true) //
// tuesday; // TUESDAY CLEAR COLLUMN //
if ((mouseX > 300) && (mouseX < 400) && (mouseY > 200) && (mouseY <= 700)) {
if (EventTuesday == true) {
EventTuesday = false;
} else {
EventTuesday = true;
}
}
// WEDNESDAY; // WEDNESDAY CLEAR COLLUMN //
if ((mouseX > 400) && (mouseX < 500) && (mouseY > 150) && (mouseY <= 650)) {
if (EventWed == true) {
EventWed = false;
} else {
EventWed = true;
}
}
// THURSDAY; // THURSDAY CLEAR COLLUMN //
if ((mouseX > 500) && (mouseX < 600) && (mouseY > 250) && (mouseY <= 600)) {
if (EventThursday == true) {
EventThursday = false;
} else {
EventThursday = true;
}
}
// FRIDAY; // FRIDAY CLEAR COLLUMN //
if ((mouseX > 600) && (mouseX < 700) && (mouseY > 250) && (mouseY <= 600)) {
if (EventFriday == true) {
EventFriday = false;
} else {
EventFriday = true;
}
}
// rect(700, 400, 95, 100, 15);
// SATURDAY CLEAR //
if ((mouseX > 700) && (mouseX < 800) && (mouseY > 400) && (mouseY <= 500)) {
if (EventSaturday == true) {
EventSaturday = false;
} else {
EventSaturday = true;
}
}
print(Event)
}