2023-12-14 15:00:02 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2023-12-21 12:29:12 +01:00
|
|
|
#include <graph.h>
|
2023-12-14 15:00:02 +01:00
|
|
|
#include "../fichier.h/menu.h"
|
|
|
|
|
2023-12-21 12:29:12 +01:00
|
|
|
int check_zone(zone z, int x, int y) {
|
|
|
|
return x >= z.x && x <= z.x + z.L && y >= z.y && y <= z.y + z.H;
|
2023-12-14 15:00:02 +01:00
|
|
|
}
|
2023-12-21 12:29:12 +01:00
|
|
|
|
|
|
|
void afficher_menu(zone jouer, zone quitter, int *choix) {
|
|
|
|
ChargerImageFond("../img/Menu.png");
|
|
|
|
while(1){
|
|
|
|
SourisPosition();
|
|
|
|
|
|
|
|
if(SourisCliquee()){
|
|
|
|
int x = _X;
|
|
|
|
int y = _Y;
|
|
|
|
if (check_zone(jouer, _X, _Y)){
|
|
|
|
*choix = 1;
|
|
|
|
return;
|
2023-12-14 15:00:02 +01:00
|
|
|
}
|
2023-12-21 12:29:12 +01:00
|
|
|
}
|
2023-12-14 15:00:02 +01:00
|
|
|
}
|
2023-12-21 12:29:12 +01:00
|
|
|
}
|