You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
projet-tut/Pontu/include/view/GameCreationMenu.h

67 lines
1.3 KiB

#include <SDL2/SDL.h>
#include <stdbool.h>
#include "engine/TextLabel.h"
#include "engine/Button.h"
#include "engine/TextureLoader.h"
#include "engine/Colors.h"
#include "engine/FontUtils.h"
#include "engine/GeneralState.h"
#include "engine/InputProcessor.h"
#include "engine/Colors.h"
#include "model/Player.h"
#include "engine/TextInput.h"
#include "engine/AudioHandler.h"
#define NB_COLORS 4
#define NB_PLAYER_MAX 4
/*
bool drawGameCreationMenu(SDL_Renderer* renderer, P_Button* incrementBtn, P_Button* decrementBtn, TextLabel* nbJoueurTxtLabel, TextLabel* nbPlayerLabel);
*/
typedef struct
{
P_Button aiButton;
P_Button* colorButtons;
TextInput pseudoInput;
Player* player;
int w;
int h;
int x;
int y;
}CreateMenuLine;
typedef struct
{
Player* p;
PlayersColors color;
} ChangeColorParams;
typedef struct
{
int* nbPlayers;
TextLabel* nbPlayersLbl;
TTF_Font* font;
int minx;
int maxx;
int miny;
CreateMenuLine* lines;
SDL_Renderer* renderer;
SDL_Color* bg;
InputProcessor* inproc;
Player players[4];
}IncrementParams;
typedef struct
{
int* nbPlayers;
CreateMenuLine* lines;
SDL_Renderer* renderer;
TextLabel* nbPlayersLbl;
SDL_Color* bg;
TTF_Font* font;
}DecrementParams;
bool gameCreationMenu(SDL_Renderer* renderer, GeneralState* generalState, AudioHandler* ah, TTF_Font* font, int width, int height, Player players[], int* nbPlayers);