aboutsummaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-02-28 00:18:29 -0500
committerNathan Vance <nathav63@gmail.com>2015-02-28 00:18:29 -0500
commit68d09777d9f188b2ac69c98ccfdcc315037224fd (patch)
tree76d41617e8ec05be2afe50a8f1b3dd6660f32332 /io.c
parentAdded battles (diff)
download7w-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.c10
1 files changed, 9 insertions, 1 deletions
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);
+}
bgstack15