diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-02-28 00:18:29 -0500 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-02-28 00:18:29 -0500 |
commit | 68d09777d9f188b2ac69c98ccfdcc315037224fd (patch) | |
tree | 76d41617e8ec05be2afe50a8f1b3dd6660f32332 /io.c | |
parent | Added battles (diff) | |
download | 7w-68d09777d9f188b2ac69c98ccfdcc315037224fd.tar.gz 7w-68d09777d9f188b2ac69c98ccfdcc315037224fd.tar.bz2 7w-68d09777d9f188b2ac69c98ccfdcc315037224fd.zip |
added science to vp count; color to trades
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); +} |