Skip to content
Snippets Groups Projects
Commit 0d2a6549 authored by Montjoie Henri's avatar Montjoie Henri
Browse files

amelioration de l'affichage de la fenetre

parent e2b969d0
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ int afficherListe(char** tabChoix, int nbChoix, TTF_Font* police,SDL_Color coule
SDL_Rect positionsTextes[nbChoix];
SDL_Color couleurNoire = {0, 0, 0};
fenetre = SDL_SetVideoMode(200, 400, 32, SDL_HWSURFACE|SDL_DOUBLEBUF);
fenetre = SDL_SetVideoMode(400, 400, 32, SDL_HWSURFACE|SDL_DOUBLEBUF);
SDL_FillRect(fenetre,NULL,SDL_MapRGB(fenetre->format,0,0,0));
while(i!=20)
......@@ -26,12 +26,14 @@ int afficherListe(char** tabChoix, int nbChoix, TTF_Font* police,SDL_Color coule
case SDL_QUIT:
i=20;
break;
default:
break;
}
for(i=0;i<nbChoix-1;i++)
for(i=0;i<nbChoix;i++)
{
tabTextes[i]=TTF_RenderText_Shaded(police, tabChoix[i], couleurTexte,couleurNoire);
positionsTextes[i].x=0;
positionsTextes[i].y=i*positionsTextes[i].h+4;
positionsTextes[i].y=i*tabTextes[i]->h+4;
SDL_BlitSurface(tabTextes[i],NULL,fenetre,&positionsTextes[i]);
}
SDL_Flip(fenetre);
......@@ -183,7 +185,7 @@ int SDL_bis()
SDL_BlitSurface(texte3,NULL,ecran,&pos_texte3_bis);
SDL_Flip(ecran);
afficherListe(obtenirNomsClasses(), nbClasses(), police,couleurBlanche);
afficherListe(obtenirNomsClasses(), nbClasses(), TTF_OpenFont("../resources/fonts/arial.ttf",26),couleurBlanche);
while(etat==CONFIGURATION)
{
SDL_WaitEvent(&event);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment