34 lines
642 B
C
34 lines
642 B
C
#include <stdlib.h>
|
|
#include <graph.h>
|
|
|
|
|
|
int main(void){
|
|
int i,j;
|
|
int x=1;
|
|
int touche;
|
|
InitialiserGraphique();
|
|
CreerFenetre(10,10,1000,1000);
|
|
ChoisirCouleurDessin(CouleurParComposante(255,0,0));
|
|
while(1){
|
|
if (ToucheEnAttente()){
|
|
touche = Touche();
|
|
if (touche == XK_t)
|
|
x = -x;
|
|
if (x==-1){
|
|
EffacerEcran(CouleurParComposante(255,255,255));
|
|
ChoisirCouleurDessin(CouleurParComposante(255,0,0));
|
|
EcrireTexte(10,10,"mode triche",2);
|
|
}
|
|
if (x==1){
|
|
EffacerEcran(CouleurParComposante(255,255,255));
|
|
|
|
}
|
|
if (touche == XK_space)
|
|
break;
|
|
}
|
|
}
|
|
FermerGraphique();
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|