summaryrefslogtreecommitdiff
path: root/blits.c
diff options
context:
space:
mode:
Diffstat (limited to 'blits.c')
-rw-r--r--blits.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/blits.c b/blits.c
index 72a33fa..2e79342 100644
--- a/blits.c
+++ b/blits.c
@@ -201,6 +201,9 @@ void update_list_entries(SURFACES *surfaces, POSITIONS *positions, const struct
off = selected / 3 * 3;
/* display at most three actions */
for (int i = 0; i < 3; ++i) {
+ const char *string;
+ char buffer[256];
+
if (off + i >= cnt) {
SDL_BlitSurface(surfaces->Pactiondesactivee, NULL, surfaces->Pecran, &positions->Vpositionactionselectionnee[i]);
continue;
@@ -211,7 +214,14 @@ void update_list_entries(SURFACES *surfaces, POSITIONS *positions, const struct
SDL_BlitSurface(surfaces->Pactionselectionnee, NULL, surfaces->Pecran, &positions->Vpositionactionselectionnee[i]);
}
- surf = TTF_RenderText_Blended(rpg_g.font, entries[off + i].name, color);
+ if (entries[off + i].children_cnt) {
+ snprintf(buffer, sizeof(buffer), "+ %s", entries[off + i].name);
+ string = buffer;
+ } else {
+ string = entries[off + i].name;
+ }
+
+ surf = TTF_RenderText_Blended(rpg_g.font, string, color);
SDL_BlitSurface(surf, NULL, surfaces->Pecran, &positions->Vpositionnomactions[i]);