diff --git a/src/SDL_bis.c b/src/SDL_bis.c index 3beec2197a014da059a4b9790a8e0ddb3e2abacc..ef378bb9c311e83af370060a25a7e10d54605aa1 100644 --- a/src/SDL_bis.c +++ b/src/SDL_bis.c @@ -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);