diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-01-10 20:58:45 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-01-10 20:58:45 +0100 |
commit | 4a0235f95dac85068cf3654ef95832608b3cdc49 (patch) | |
tree | 0b87ed75e98fcee227465efb7f3fb96d2116ade8 /blits.c | |
parent | 843026b1346d085c699dfe5049e104dca420b934 (diff) |
emphasize the categories in the action list
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'blits.c')
-rw-r--r-- | blits.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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]); |