From 68d09777d9f188b2ac69c98ccfdcc315037224fd Mon Sep 17 00:00:00 2001 From: Nathan Vance Date: Sat, 28 Feb 2015 00:18:29 -0500 Subject: added science to vp count; color to trades --- io.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index 68c9010..bec7045 100644 --- a/io.c +++ b/io.c @@ -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); +} -- cgit