diff --git a/background/menu-jouer.png b/background/menu-jouer.png new file mode 100644 index 0000000..25afba4 Binary files /dev/null and b/background/menu-jouer.png differ diff --git a/background/menu-quitter.png b/background/menu-quitter.png new file mode 100644 index 0000000..5a46848 Binary files /dev/null and b/background/menu-quitter.png differ diff --git a/background/menu-theme-retour.png b/background/menu-theme-retour.png new file mode 100644 index 0000000..21dc6ba Binary files /dev/null and b/background/menu-theme-retour.png differ diff --git a/background/menu-theme.png b/background/menu-theme.png new file mode 100644 index 0000000..ba68aff Binary files /dev/null and b/background/menu-theme.png differ diff --git a/background/menu.png b/background/menu.png new file mode 100644 index 0000000..878a01b Binary files /dev/null and b/background/menu.png differ diff --git a/menu_v2 b/menu_v2 new file mode 100755 index 0000000..4d3eab2 Binary files /dev/null and b/menu_v2 differ diff --git a/menu_v2.c b/menu_v2.c new file mode 100644 index 0000000..bbca657 --- /dev/null +++ b/menu_v2.c @@ -0,0 +1,87 @@ +#include +#include +#include + +int menu_principal(void){ + int x; + int y; + + ToucheEnAttente(); + while(1){ + SourisPosition(); + x=_X; + y=_Y; + if((x>384) && (x<1114) && (y>384) && (y<460)){ + ChargerImageFond("./background/menu-jouer.png"); + } + else if((x>384) && (x<1114) && (y>497) && (y<573)){ + ChargerImageFond("./background/menu-quitter.png"); + } + else{ + ChargerImageFond("./background/menu.png"); + } + + if(SourisCliquee()){ + x=_X; + y=_Y; + + if((x>384) && (x<1114) && (y>497) && (y<572)){ + break; + } + + if((x>384) && (x<1114) && (y>384) && (y<459)){ + ChargerImageFond("./background/menu-theme.png"); + ToucheEnAttente(); + while(1){ + SourisPosition(); + x=_X; + y=_Y; + if((x>1194) && (x<1399) && (y>45) && (y<121)){ + ChargerImageFond("./background/menu-theme-retour.png"); + } + else{ + ChargerImageFond("./background/menu-theme.png"); + } + + if (SourisCliquee()){ + x=_X; + y=_Y; + 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){ + + } + } + if((x>535) && (x<960) && (y>356) && (y<781)){ + EffacerEcran(CouleurParNom("grey")); + while(1){ + } + } + if((x>1005) && (x<1430) && (y>356) &&(y<781)){ + EffacerEcran(CouleurParNom("grey")); + while(1){ + } + } + } + } + } + } + } + FermerGraphique(); + return EXIT_SUCCESS; +} + + +int main(void){ + int x ; + int y ; + couleur c; + + InitialiserGraphique(); + CreerFenetre(10,10,1500,844); + menu_principal(); + return EXIT_SUCCESS; +}