Codes
void setup(){
size(600,800);
background(38,47,83);
fill(222,217,210);
stroke(222,217,210);
rect(0,0,width,height,55);
fill(178,171,162);
stroke(178,171,162);
rect(0,400,width,height,55);
fill(38,47,83);
textSize(32);
text("HOTEL ROOM INTERFACE", 130, 600);
}
void draw(){
fill(74,49,27);
stroke(74,49,27);
rect(64,99,159,44,10); //food
fill(38,47,83);
stroke(38,47,83);
rect(220,196,159,44,10); //management
fill(67,117,32);
stroke(67,117,32);
rect(393,99,159,44,10); //cleaning
fill(64,13,59);
stroke(64,13,59);
rect(64,293,159,44,10); //concierge
fill(89,2,2);
stroke(89,2,2);
rect(393,293,159,44,10); //security
textSize(24);
fill(255);
text("Food", 115, 127);
text("Cleaning", 430, 127);
text("Management", 237, 223);
text("Concierge", 97, 320);
text("Security", 430, 320);
fill(38,47,83);
text("HOTEL ROOM INTERFACE", 170, 50);
}
void mouseClicked(){
if((mouseX>=64)&(mouseX<=223)&(mouseY>=99)&(mouseY<=143))
{
println("food");
fill(74,49,27);
stroke(74,49,27);
rect(0,400,width,height,55);
fill(255);
textSize(24);
text("HOTEL ROOM INTERFACE", 170, 500);
textSize(36);
text("Food delivery is at your door", 80, 650);
}
else if((mouseX>=393)&(mouseX<=552)&(mouseY>=99)&(mouseY<=143))
{
println("cleaning");
fill(67,117,32);
stroke(67,117,32);
rect(0,400,width,height,55);
fill(255);
textSize(24);
text("HOTEL ROOM INTERFACE", 170, 500);
textSize(36);
text("Cleaning service is at your door", 60, 650);
}
else if((mouseX>=220)&(mouseX<=379)&(mouseY>=196)&(mouseY<=240))
{
println("management");
fill(38,47,83);
stroke(38,47,83);
rect(0,400,width,height,55);
fill(255);
textSize(24);
text("HOTEL ROOM INTERFACE", 170, 500);
textSize(36);
text("Management is at your door", 80, 650);
}
else if((mouseX>=64)&(mouseX<=223)&(mouseY>=293)&(mouseY<=337))
{
println("concierge");
fill(64,13,59);
stroke(64,13,59);
rect(0,400,width,height,55);
fill(255);
textSize(24);
text("HOTEL ROOM INTERFACE", 170, 500);
textSize(36);
text("Concierge is at your door", 110, 650);
}
else if((mouseX>=393)&(mouseX<=552)&(mouseY>=293)&(mouseY<=337))
{
println("security");
fill(89,2,2);
stroke(89,2,2);
rect(0,400,width,height,55);
fill(255);
textSize(24);
text("HOTEL ROOM INTERFACE", 170, 500);
textSize(36);
text("Security is at your door", 120, 650);
}
}