Maj de l'interface, nouvelle fonction
This commit is contained in:
43
saeMain.c
43
saeMain.c
@@ -1,32 +1,31 @@
|
||||
#include <stdlib.h>
|
||||
#include <graph.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ChargerMainMenu.h"
|
||||
#include "ChargerMode.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
char quit;
|
||||
couleur c;
|
||||
int main() {
|
||||
int mainMenu=1;
|
||||
InitialiserGraphique();
|
||||
CreerFenetre(10,10,1300,760);
|
||||
c=CouleurParComposante(31, 31, 96);
|
||||
EffacerEcran(c);
|
||||
c=CouleurParNom("white");
|
||||
ChoisirCouleurDessin(c);
|
||||
ChargerImage("./images/fondaccueil.jpg",300,240,1300,760,0,0);
|
||||
EcrireTexte(587,60,"Match Pairs",2);
|
||||
DessinerRectangle(460,135,400,110);
|
||||
EcrireTexte(588,200,"Easy : 4x4",2);
|
||||
DessinerRectangle(460,315,400,110);
|
||||
EcrireTexte(583,380,"Medium : 6x5",2);
|
||||
DessinerRectangle(460,505,400,110);
|
||||
EcrireTexte(588,570,"Hard : 8x6",2);
|
||||
EcrireTexte(12,748,"Press Q to quit the game",1);
|
||||
while(quit!='q' | quit!='Q') {
|
||||
quit=Touche();
|
||||
if (quit=='q' | quit=='Q') {
|
||||
FermerGraphique();
|
||||
return EXIT_SUCCESS;
|
||||
int i;
|
||||
ChargerMainMenu();
|
||||
while(mainMenu) {
|
||||
if (SourisCliquee()) {
|
||||
SourisPosition();
|
||||
if (_X>1250 && _X <1260+30 && _Y>15 && _Y < 15+30) {
|
||||
mainMenu=0;
|
||||
}
|
||||
else if (_X>445 && _X<445+441 && _Y>230 && _Y<230+129) { /*Joueur choisit le mode facile, charger le mode facile*/
|
||||
mainMenu=0;
|
||||
ChargerDifficulte(1);
|
||||
}
|
||||
else if (_X>445 && _X<445+441 && _Y>400 && _Y<400+129) {
|
||||
ChargerDifficulte(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
FermerGraphique();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user