From 0ff18f38d60573ee00cab8b252a692d86d5836c7 Mon Sep 17 00:00:00 2001 From: valentin carmona Date: Sun, 13 Mar 2022 11:36:52 +0100 Subject: [PATCH] =?UTF-8?q?l=C3=A9g=C3=A8re=20modif=20du=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/model.c b/model.c index 3f29b5b..ebff75d 100644 --- a/model.c +++ b/model.c @@ -11,7 +11,14 @@ /* **************************************************************** */ struct Env_t { - /* PUT YOUR VARIABLES HERE */ + SDL_Texture* but_new_game_up; + SDL_Texture* but_new_game_down; + SDL_Texture* but_undo_up; + SDL_Texture* but_undo_down; + SDL_Texture* but_redo_up; + SDL_Texture* but_redo_down; + SDL_Texture* but_solve_up; + SDL_Texture* but_solve_down; }; /* **************************************************************** */ @@ -36,9 +43,23 @@ bool process(SDL_Window* win, SDL_Renderer* ren, Env* env, SDL_Event* e) { SDL_GetWindowSize(win, &w, &h); if (e->type == SDL_QUIT) { - return true; - } + return true; + } +#ifdef _ANDROID_ +#else + + else if (e->type == SDL_WINDOWEVENT){ + init(win, ren , w, h/*(w, h) a changer*/); + } + else if (e->type == SDL_SDL_MOUSEMOTION){ + SDL_Point mouse; + SDL_GetMouseState(&mouse.x, &mouse.y); + } + else if (e->type == SDL_MOUSEBUTTONDOWN){ + + } +#endif return false; }