From 64ac91c564a20e2ebf19ad211e987fbfc7fb2719 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 25 May 2015 18:08:18 -0700 Subject: 1457 - print to display in color Just foreground color for now. --- 070display.cc | 7 ++++++- display.mu | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/070display.cc b/070display.cc index 2a2c51a7..1bfdb822 100644 --- a/070display.cc +++ b/070display.cc @@ -89,7 +89,12 @@ case PRINT_CHARACTER_TO_DISPLAY: { } break; } - tb_change_cell(Display_column, Display_row, c, TB_WHITE, TB_DEFAULT); + int color = TB_WHITE; + if (SIZE(ingredients) > 1) { + assert(scalar(ingredients.at(1))); + color = ingredients.at(1).at(0); + } + tb_change_cell(Display_column, Display_row, c, color, TB_DEFAULT); if (Display_column < width-1) { ++Display_column; tb_set_cursor(Display_column, Display_row); diff --git a/display.mu b/display.mu index a0c33e5d..dc083789 100644 --- a/display.mu +++ b/display.mu @@ -2,7 +2,7 @@ recipe main [ switch-to-display - print-character-to-display 97:literal + print-character-to-display 97:literal, 2:literal/red 1:number/raw, 2:number/raw <- cursor-position-on-display wait-for-key-from-keyboard clear-display -- cgit 1.4.1-2-gfad0