This commit is contained in:
Lukian LEIZOUR 2023-11-20 14:42:20 +01:00
parent aa5045a797
commit dec244496a
10 changed files with 148 additions and 76 deletions

View file

@ -2,6 +2,7 @@
#include <stdlib.h>
#include <windows.h>
#include "screenManager.h"
#include "conf.h"
void goToCoords(int x, int y)
{
@ -80,7 +81,7 @@ void drawMenu(char *options[], int lenght) {
}
void menuConf() {
void menuConf(ptConf confChain, ptListener listenerChain) {
char *options[] = {"1/ Voir la liste des conferences", "2/ Ajouter une conference", "3/ Suprimer une conference", "4/ Retour"};
system("cls");
drawMenu(options, 4);
@ -101,16 +102,16 @@ void menuConf() {
break;
case 4:
menu();
menu(confChain, listenerChain);
break;
default:
menu();
menu(confChain, listenerChain);
break;
}
}
void menuAbo() {
void menuAbo(ptConf confChain, ptListener listenerChain) {
char *options[] = {"1/ Voir la liste des abonnes", "2/ Ajouter un abonne", "3/ Suprimer un abonne", "4/ Retour"};
system("cls");
drawMenu(options, 4);
@ -131,16 +132,16 @@ void menuAbo() {
break;
case 4:
menu();
menu(confChain, listenerChain);
break;
default:
menu();
menu(confChain, listenerChain);
break;
}
}
void menu()
void menu(ptConf confChain, ptListener listenerChain)
{
char *options[] = {"1/ Gestion des conferences", "2/ Gestion des abonnes", "3/ Participer a une conference", "4/ Voir la meilleure conference", "5/ Voir la participation a une conference", "6/ Quitter"};
system("cls");
@ -153,11 +154,11 @@ void menu()
switch (choice)
{
case 1:
menuConf();
menuConf(confChain, listenerChain);
break;
case 2:
menuAbo();
menuAbo(confChain, listenerChain);
break;
case 3:
@ -175,4 +176,4 @@ void menu()
default:
break;
}
}
}