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

Commit

Permalink
Merge branch 'master' into featureShowGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Feelzor committed Jan 22, 2019
2 parents 636014e + 208d437 commit 19ba7d2
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gaudigraph.adb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ begin
triVectGaudi(V);
close(f);

initialiserFenetres;
accueil;
fen := debutFenetre("Test", 500, 500);
afficherGrille(fen, 50, 50, V);
ajouterBouton(fen, "continuer", "Next", 225, 470, 50, 50);
Expand Down
46 changes: 44 additions & 2 deletions p_vue_graph.adb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with p_fenbase, Forms, p_combinaisons, Ada.Strings, Ada.Strings.Fixed, text_io;
use p_fenbase, Forms, p_combinaisons, Ada.Strings, Ada.Strings.Fixed, text_io, p_combinaisons.p_int_io;
with p_fenbase, Forms, p_combinaisons, Ada.Strings, Ada.Strings.Fixed;
use p_fenbase, Forms, p_combinaisons, Ada.Strings, Ada.Strings.Fixed;

package body p_vue_graph is

Expand Down Expand Up @@ -35,4 +35,46 @@ package body p_vue_graph is
end loop;
end afficherGrille;

procedure accueil is
fenetre : TR_Fenetre;
begin
initialiserFenetres;
fenetre:= DebutFenetre("Acceuil",500,500);
for i in 3..7 loop
ajouterBouton(fenetre, integer'image(i)(2..2),integer'image(i)(2..2), 75+(75*(i-3)) , 300, 50, 50);
changerTailleTexte(fenetre, integer'image(i)(2..2),FL_MEDIUM_SIZE);
changerStyleTexte(fenetre, integer'image(i)(2..2), FL_BOLD_STYLE);
end loop;
ajouterBouton(fenetre, "Contigue", "Solutions contigue", 35 , 375 , 200 , 50);
ajouterBouton(fenetre, "Normal", "Toutes les solutions", 265 , 375 , 200 , 50);
ajouterBouton(fenetre, "Fermer", "Quitter", 200 , 450 , 100 , 50);
ajouterTexte(fenetre, "Textintro", "Lorem ipsum dolor sit amet, tempor incididu labore et dolor ", 50,100,400,20);
ajouterTexte(fenetre, "Textintro2", "Lorem ipsum dolor sit amet, tempor incididu labore et dolor ", 50,112,400,20);
ajouterTexte(fenetre, "Textintro3", "Lorem ipsum dolor sit amet, tempor incididu labore et dolor ", 50,124,400,20);
finFenetre(fenetre);
montrerFenetre(fenetre);
appuiBoutonAccueil(attendreBouton(fenetre),fenetre);
end accueil;

procedure appuiBoutonAccueil (Elem : in string; fenetre : in out TR_Fenetre) is

begin --
if Elem in "3" | "4" | "5" | "6" | "7" then
for i in 3..7 loop
changerCouleurTexte(fenetre,integer'image(i)(2..2), FL_BLACK);
end loop;
changerCouleurTexte(fenetre,Elem , FL_DOGERBLUE);
nbCasesSolution := integer'value(elem);
appuiBoutonAccueil(attendreBouton(fenetre),fenetre);
elsif Elem in "Contigue" | "Normal" then
--fenetreJeu(Elem,fenetre)
Null;
elsif Elem = "Fermer" then
CacherFenetre(fenetre);
else
appuiBoutonAccueil(attendreBouton(fenetre),fenetre);
end if;

end appuiBoutonAccueil;

end p_vue_graph;
5 changes: 5 additions & 0 deletions p_vue_graph.ads
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ with p_fenbase, p_combinaisons;
use p_fenbase, p_combinaisons;

package p_vue_graph is
nbCasesSolution : integer;

procedure afficherGrille(fen: in out TR_Fenetre; x,y: in natural; V: in TV_Gaudi);
-- {} => {Affiche la grille avec le bord gauche à la position (x,y)}

procedure accueil;

procedure appuiBoutonAccueil (Elem : in string; fenetre : in out TR_Fenetre);

end p_vue_graph;

0 comments on commit 19ba7d2

Please sign in to comment.