From a64de143f030c8b7b45585ab3fcb9566df09531b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathis=20Rib=C3=A9mont?= Date: Mon, 29 Nov 2021 09:50:54 +0100 Subject: [PATCH 1/2] prototype et structure bouton --- Pontu/include/moteur/button.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Pontu/include/moteur/button.h b/Pontu/include/moteur/button.h index e69de29..3bb2513 100644 --- a/Pontu/include/moteur/button.h +++ b/Pontu/include/moteur/button.h @@ -0,0 +1,16 @@ +#ifndef BUTTON_INCLUDED +#define BUTTON_INCLUDED + +#include +#include +typedef struct { + char *text; + SDL_Texture texture; //sprite ou texture de fond + SDL_Rect rect; //définie les coordonnées et la taile, pour la hitbox et l'affichage +} P_Button; + +P_Button createButton(char* text, SDL_Texture* texture,TTF_Font* police, int coordx, int coordy, int sizex, int sizey); +// texture: design du bouton, si rien n'est passer, le bouton sera générer dans la fonction. + +void putButtonOnRenderer(SDL_Renderer* renderer, P_Button* button); +#ifndef From fe1984804bc9ac0de0adf6ccc565d88fc07f610a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathis=20Rib=C3=A9mont?= Date: Mon, 29 Nov 2021 09:53:39 +0100 Subject: [PATCH 2/2] rename button.h to Button.h --- Pontu/include/moteur/{button.h => Button.h} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Pontu/include/moteur/{button.h => Button.h} (100%) diff --git a/Pontu/include/moteur/button.h b/Pontu/include/moteur/Button.h similarity index 100% rename from Pontu/include/moteur/button.h rename to Pontu/include/moteur/Button.h