summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-10 20:58:45 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-10 20:58:45 +0100
commit4a0235f95dac85068cf3654ef95832608b3cdc49 (patch)
tree0b87ed75e98fcee227465efb7f3fb96d2116ade8
parent843026b1346d085c699dfe5049e104dca420b934 (diff)
emphasize the categories in the action list
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-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]);