aboutsummaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
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