|
|
|
@ -32,6 +32,35 @@ struct array_P_Button createGameInterfaceButtons(SDL_Renderer* renderer, FontHan
|
|
|
|
|
return buttons;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct array_TextLabel createGameInterfaceLabels(SDL_Renderer* renderer, FontHandler* fontHandler) {
|
|
|
|
|
//Postion text label
|
|
|
|
|
SDL_Point positonNbTurnLabel = {.x=60, .y=800};
|
|
|
|
|
SDL_Point positionTimeLablel = {.x=770, .y=800};
|
|
|
|
|
|
|
|
|
|
//Color labal
|
|
|
|
|
SDL_Color colorLabel = {0, 255, 0, 255};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Position label
|
|
|
|
|
PositionX_Type positionX = POSX_CENTER;
|
|
|
|
|
PositionY_Type positionY = POSY_CENTER;
|
|
|
|
|
|
|
|
|
|
struct array_TextLabel labels = array_TextLabel_Create();
|
|
|
|
|
|
|
|
|
|
// Label : Nb Turn
|
|
|
|
|
TextLabel nbTurnLabel = createTextLabel("Turn : ",&positonNbTurnLabel,1,&colorLabel,fontHandler.fonts[FONT_retro],renderer,positionX,positionY);
|
|
|
|
|
// Label : Time of the game
|
|
|
|
|
TextLabel timeLabel = createTextLabel("Time : ",&positionTimeLablel,1,&colorLabel,fontHandler.fonts[FONT_retro],renderer,positionX,positionY);
|
|
|
|
|
|
|
|
|
|
//Add TextLabel to the array
|
|
|
|
|
array_TextLabel_AddElement(&labels, nbTurnLabel);
|
|
|
|
|
array_TextLabel_AddElement(&labels, timeLabel);
|
|
|
|
|
|
|
|
|
|
return labels;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void drawButtons(SDL_Renderer* renderer, FontHandler fontHandler)
|
|
|
|
|
{
|
|
|
|
|
//DRAW MENU BUTTON (TOP RIGHT CORNER)
|
|
|
|
|