Skip to content

Commit

Permalink
Colour users red if they have a negative balance
Browse files Browse the repository at this point in the history
  • Loading branch information
lysogeny authored and stapelberg committed Nov 5, 2023
1 parent 09c1dcc commit f4d9424
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Binary file modified credits
Binary file not shown.
13 changes: 11 additions & 2 deletions src/credit_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@ static void print_item(BYTE i) {
cprintf("%2d", i);
textcolor(TC_LIGHT_GRAY);
// TODO: switch to MAX_CREDIT_NAME_LENGTH once that is increased
cprintf(" %-" xstr(MAX_ITEM_NAME_LENGTH) "s \xDD%3s ",
credits.credits[i].nickname, buffer);
if (credit < 0) {
textcolor(TC_LIGHT_RED);
}
cprintf(" %-" xstr(MAX_ITEM_NAME_LENGTH) "s ", credits.credits[i].nickname);
textcolor(TC_LIGHT_GRAY);
cprintf("\xDD");
if (credit < 0) {
textcolor(TC_LIGHT_RED);
}
cprintf("%3s ", buffer);
textcolor(TC_LIGHT_GRAY);
}

static void print_line(BYTE i) {
Expand Down

0 comments on commit f4d9424

Please sign in to comment.