diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -104,8 +104,9 @@ int io_printtext(int xorigin, int y, int width, char* text) x = xorigin+2; } mvprintw(y, x, ""); - for(i = wordstart; i < wordstart+wordlength; i++) + for(i = wordstart; i < wordstart+wordlength; i++) { if(text[i] != '\n') addch(text[i]); + } x += wordlength; wordstart += wordlength; } @@ -216,3 +217,10 @@ void io_printplain(int x, int y, char *s) { mvprintw(y, x, "%s", s); } + +void io_printcolor(int x, int y, int color, char *s) +{ + attron(COLOR_PAIR(color)); + io_printplain(x, y, s); + attrset(A_NORMAL); +} |