This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
with p_vue_graph, p_fenbase, Forms, p_combinaisons; | ||
use p_vue_graph, p_fenbase, Forms, p_combinaisons, p_combinaisons.p_cases_io; | ||
|
||
procedure gaudigraph is | ||
fen: TR_Fenetre; | ||
|
||
f: p_cases_io.file_type; | ||
V: TV_Gaudi(1..16); | ||
begin | ||
open(f, IN_FILE, "CarreGaudi"); | ||
CreeVectGaudi(f, V); | ||
triVectGaudi(V); | ||
close(f); | ||
|
||
initialiserFenetres; | ||
fen := debutFenetre("Test", 500, 500); | ||
afficherGrille(fen, 50, 50, V); | ||
ajouterBouton(fen, "continuer", "Next", 225, 470, 50, 50); | ||
finFenetre(fen); | ||
|
||
montrerFenetre(fen); | ||
|
||
if attendreBouton(fen) /= "MDR" then null; end if; | ||
cacherFenetre(fen); | ||
delay 1.0; | ||
|
||
end gaudigraph; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,38 @@ | ||
with p_fenbase; use p_fenbase; | ||
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; | ||
|
||
package body p_vue_graph is | ||
|
||
procedure debutModeGraph is | ||
|
||
function GetElement ( | ||
Pliste : TA_Element; | ||
NomElement : String ) | ||
return TA_Element is | ||
begin | ||
if Pliste=null or else Pliste.NomElement.all>NomElement then | ||
return null; | ||
elsif Pliste.NomElement.all=NomElement then | ||
return Pliste; | ||
else | ||
return GetElement(Pliste.Suivant,NomElement); | ||
end if; | ||
end GetElement; | ||
|
||
procedure afficherGrille(fen: in out TR_Fenetre; x,y: in natural; V: in TV_Gaudi) is | ||
-- {} => {Affiche la grille avec le bord gauche à la position (x,y)} | ||
textX, textY: natural; | ||
P : TA_Element; | ||
begin | ||
ajouterTexte(fen, "fond_grille", "", x, y, 400, 400); | ||
changerCouleurFond(fen, "fond_grille", FL_BLACK); | ||
|
||
for i in V'range loop | ||
textX := x + 5 + (99 * ((i-1) / 4)); | ||
textY := y + 5 + (99 * ((i-1) mod 4)); | ||
ajouterTexte(fen, V(i).nom, trim(Integer'image(V(i).valeur), BOTH), textX, textY, 92, 92); | ||
changerTailleTexte(fen, V(i).nom, FL_HUGE_SIZE); | ||
P := GetElement(fen.PElements, V(i).nom); | ||
fl_set_object_align(P.Pelement, FL_ALIGN_CENTER); | ||
end loop; | ||
end afficherGrille; | ||
|
||
end p_vue_graph; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
with p_fenbase; use p_fenbase; | ||
|
||
with p_fenbase, p_combinaisons; | ||
use p_fenbase, p_combinaisons; | ||
|
||
package p_vue_graph is | ||
|
||
|
||
|
||
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)} | ||
|
||
end p_vue_graph; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters