This commit is contained in:
lecointre
2025-12-07 21:24:15 +01:00
parent 512523b53d
commit ff7259159c
20 changed files with 86 additions and 46 deletions
+12 -7
View File
@@ -4,6 +4,7 @@
#include "menu_view.h"
#include "defs.h"
#include "images.h"
#include <graph.h>
#include <stdio.h>
#include <stdlib.h>
@@ -48,9 +49,9 @@ void menu_render(const menu_state_t *state)
couleur C_TEXTE = CouleurParNom("black");
couleur C_BOUTON = CouleurParNom("dark gray");
couleur C_START = CouleurParNom("green");
char buffer[50];
char buffer[50];
char path_buffer[30];
image_source_t current_src;
EffacerEcran(C_FOND);
ChoisirCouleurDessin(C_TEXTE);
@@ -64,14 +65,18 @@ void menu_render(const menu_state_t *state)
int x = IMG_START_X + i * IMG_SPACING;
int y = IMG_START_Y;
/* Définition du chemin */
/* Définition du chemin
if (i == 0) {
strcpy(path_buffer, "assets/spiderman.jpg");
strcpy(path_buffer, "assets/spiderman_small.png");
} else if (i == 1) {
strcpy(path_buffer, "assets/capy.jpg");
strcpy(path_buffer, "assets/capy_small.png");
} else {
strcpy(path_buffer, "assets/iut.jpg");
}
strcpy(path_buffer, "assets/iut_small.png");
}*/
/* OBTENIR LE CHEMIN OPTIMISÉ */
current_src = get_image_source(i);
strcpy(path_buffer, current_src.preview_path);
/* Affiche l'image */
ChargerImage(path_buffer,