diff --git a/background/ecran-victoire.png b/background/ecran-victoire.png new file mode 100644 index 0000000..d2d8cbf Binary files /dev/null and b/background/ecran-victoire.png differ diff --git a/background/menu-difficultee.png b/background/menu-difficultee.png new file mode 100644 index 0000000..aec6f5e Binary files /dev/null and b/background/menu-difficultee.png differ diff --git a/menu_v2 b/menu_v2 index 4d3eab2..daa3c25 100755 Binary files a/menu_v2 and b/menu_v2 differ diff --git a/menu_v2.c b/menu_v2.c index bbca657..17fd174 100644 --- a/menu_v2.c +++ b/menu_v2.c @@ -3,6 +3,7 @@ #include int menu_principal(void){ + //créeation de variable de position int x; int y; @@ -11,34 +12,48 @@ int menu_principal(void){ SourisPosition(); x=_X; y=_Y; + + //affichage du menu principal sur le boutton jouer if((x>384) && (x<1114) && (y>384) && (y<460)){ ChargerImageFond("./background/menu-jouer.png"); } + + //afficage du menu principal sur le boutton quitter else if((x>384) && (x<1114) && (y>497) && (y<573)){ ChargerImageFond("./background/menu-quitter.png"); } + + //affichage du menu principal else{ ChargerImageFond("./background/menu.png"); } + if(SourisCliquee()){ x=_X; y=_Y; + //quitter if((x>384) && (x<1114) && (y>497) && (y<572)){ break; } + //affichage du menu theme if((x>384) && (x<1114) && (y>384) && (y<459)){ ChargerImageFond("./background/menu-theme.png"); + ToucheEnAttente(); while(1){ SourisPosition(); x=_X; y=_Y; + + //affichage du menu sur le boutton retour if((x>1194) && (x<1399) && (y>45) && (y<121)){ ChargerImageFond("./background/menu-theme-retour.png"); } + + //affichage du menu theme else{ ChargerImageFond("./background/menu-theme.png"); } @@ -46,23 +61,73 @@ int menu_principal(void){ if (SourisCliquee()){ x=_X; y=_Y; + + //retour au menu principal if((x>1194) && (x<1399) && (y>45) && (y<121)){ menu_principal(); } - if((x>66) && (x<491) && (y>356) && (y<781)){ - EffacerEcran(CouleurParNom("grey")); - while(1){ + //affichage du menu difficultée du theme n°1 + if((x>66) && (x<491) && (y>356) && (y<781)){ + ChargerImageFond("./background/menu-difficultee.png"); + + while(1){ + if(SourisCliquee()){ + x=_X; + y=_Y; + + if((x>68) && (x<488) && (y>266) && (y<696)){ + EffacerEcran(CouleurParNom("grey")); + } + if((x>537) && (x<958) && (y>266) && (y<696)){ + EffacerEcran(CouleurParNom("grey")); + } + if((x>1007) && (x<1432) && (y>266) && (y<696)) { + EffacerEcran(CouleurParNom("grey")); + } + } } } + + //affichage du menu difficultée du theme n°2 if((x>535) && (x<960) && (y>356) && (y<781)){ - EffacerEcran(CouleurParNom("grey")); + ChargerImageFond("./background/menu-difficultee.png"); + while(1){ + if(SourisCliquee()){ + x=_X; + y=_Y; + if((x>68) && (x<488) && (y>266) && (y<696)){ + EffacerEcran(CouleurParNom("grey")); + } + if((x>537) && (x<958) && (y>266) && (y<696)){ + EffacerEcran(CouleurParNom("grey")); + } + if((x>1007) && (x<1432) && (y>266) && (y<696)) { + EffacerEcran(CouleurParNom("grey")); + } + } } } + + //affichage du menu difficultée du theme 3 if((x>1005) && (x<1430) && (y>356) &&(y<781)){ - EffacerEcran(CouleurParNom("grey")); + ChargerImageFond("./background/menu-difficultee.png"); + while(1){ + if(SourisCliquee()){ + x=_X; + y=_Y; + if((x>68) && (x<488) && (y>266) && (y<696)){ + EffacerEcran(CouleurParNom("grey")); + } + if((x>537) && (x<958) && (y>266) && (y<696)){ + EffacerEcran(CouleurParNom("grey")); + } + if((x>1007) && (x<1432) && (y>266) && (y<696)) { + EffacerEcran(CouleurParNom("grey")); + } + } } } } @@ -76,12 +141,12 @@ int menu_principal(void){ int main(void){ - int x ; - int y ; - couleur c; - + //création de la fenetre InitialiserGraphique(); CreerFenetre(10,10,1500,844); + + //ouverture du menu principal menu_principal(); + return EXIT_SUCCESS; }