Newer
Older
class MainMenu{
boolean isSettingsClick = false;
boolean isPlayGame = false;
PFont comic;
void draw(){
background(255);
rectMode(CENTER);
fill(255);
rect(width/3, height/2 + 100, 300, 100);
rect(width-width/3, height/2 + 100, 300, 100);
textAlign(CENTER);
comic = createFont("COMIC.TTF", 80);
textFont(comic);
fill(0);
text("Jouer", width/3,height/2+125);
text("A venir", width-width/3,height/2+125);
if(mousePressed){
if(mouseX < width/2 && mouseY > height/2 + 50 && mouseY < height/2 + 150){
println("boutton gauche");
isPlayGame = true;
}
if(mouseX > width/2 && mouseY > height/2 + 50 && mouseY < height/2 + 150){
println("boutton droit");
}
}
}
}