Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
a comanter
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsKrattinger committed Jan 24, 2019
1 parent 93508ea commit 0b62ccc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
25 changes: 18 additions & 7 deletions p_vue_graph.adb
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ package body p_vue_graph is
end afficherGrille;

procedure fenetreaccueil is
-- {} => {affiche la fenetre d'accueil}
fenetre : TR_Fenetre;
begin
fenetre:= DebutFenetre("Accueil",500,600);
Expand Down Expand Up @@ -245,9 +246,7 @@ package body p_vue_graph is
fscore : p_score_io.file_type;
i : integer ;
begin
put("avant");
open(fscore, IN_FILE, "score");
put("après if2");
i := 1;
fenetre:= DebutFenetre("Scoreboard",500,600);
if Nbscores(fscore) > 0 then
Expand All @@ -258,7 +257,7 @@ package body p_vue_graph is
reset(fscore,IN_FILE);
CopieFicherScore(fscore,VScore);
triBullesScores(VScore);
while i <= 10 and i <= VScore'last loop
while i <= 10 and i <= VScore'last loop --On Crée une zone de text par joueur pour les 10prmeir au maximum
ajouterTexte(fenetre, "Joueurs" &integer'image(i) , " Joueur : " & VScore(i).pseudo, 50,50 + (50*i),250,30);
ajouterTexte(fenetre, "Score" &integer'image(i) , "Points : " & integer'image(VScore(i).Score), 250,50 + (50*i),250,30);
i := i+1;
Expand All @@ -271,15 +270,26 @@ package body p_vue_graph is
ajouterBouton(fenetre, "valider", "Valider", 200 , 560 , 100 , 30);
finFenetre(fenetre);
montrerFenetre(fenetre);
put("après if");

put("après");
if attendreBouton(fenetre) = "valider" then
cacherFenetre(fenetre);
fenetreaccueil;
end if;
end fenetreScores;

procedure fenetreInfo is
fenetre : TR_Fenetre;
begin
fenetre:= DebutFenetre("informations",600,300);
AjouterBoutonImage(fenetre,"Info", "", 0 , 0 , 600 , 300);
changerImageBouton(fenetre,"Info","info.xpm");
finFenetre(fenetre);
montrerFenetre(fenetre);
if attendreBouton(fenetre) /= "00" then
null;
end if;
end;


procedure ouvreFenetreSolutions(nomFichier: in string; fenetre: TR_Fenetre) is
begin
open(fichierSolution, IN_FILE, nomFichier);
Expand Down Expand Up @@ -327,7 +337,8 @@ package body p_vue_graph is
chronoJeu.fermer;
elsif Elem = "Scoreboard" then
CacherFenetre(fenetre);
fenetreScores;
-- fenetreScores;
fenetreInfo;
else
appuiBoutonAccueil(attendreBouton(fenetre),fenetre);
end if;
Expand Down
7 changes: 6 additions & 1 deletion p_vue_graph.ads
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ package p_vue_graph is

procedure AjouterBoutonInvisible (F : in out TR_Fenetre; NomElement : in String; X, Y : in Natural; Largeur, Hauteur : in Positive);

procedure fenetreRegles ;

procedure appuiBoutonRegles (Elem : in string; fenetre : in out TR_Fenetre);
--{} => {Affiche la fenetre d'Accueil}
Expand All @@ -35,6 +34,12 @@ package p_vue_graph is
procedure fenetreScores;
--{} => {Affiche la fenetre Scoreboard}

procedure fenetreRegles;
--{} => {Affiche la fenetre Scoreboard}

procedure fenetreInfo;
--{} => {Affiche la fenetre des informations}

procedure appuiBoutonAccueil (Elem : in string; fenetre : in out TR_Fenetre);
--{} => {Affiche la fenetre Solutions}

Expand Down

0 comments on commit 0b62ccc

Please sign in to comment.