aboutsummaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2016-02-07 17:56:45 -0500
committerNathan Vance <nathav63@gmail.com>2016-02-07 17:56:45 -0500
commit5ff076c4e040563be94726ba8104444713c8a546 (patch)
tree09fb2a7349804f1cd6f30c4b7846a7669c5022c9 /io.c
parentUpdated to work with gcc 5.X (diff)
download7w-5ff076c4e040563be94726ba8104444713c8a546.tar.gz
7w-5ff076c4e040563be94726ba8104444713c8a546.tar.bz2
7w-5ff076c4e040563be94726ba8104444713c8a546.zip
Bug fixes dealing with colorHEADmaster
Diffstat (limited to 'io.c')
-rw-r--r--io.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/io.c b/io.c
index 0f39881..e7d99ac 100644
--- a/io.c
+++ b/io.c
@@ -50,6 +50,14 @@ int io_getkey() {
}
}
+static void turn_off_attributes() {
+ int i;
+ for(i = 31; i <= 38; i++)
+ attroff(COLOR_PAIR(i));
+ attroff(A_BLINK);
+ attroff(A_REVERSE);
+}
+
void io_clearscreen() {
clear();
}
@@ -59,7 +67,8 @@ void io_printname(int x, int y, int era, int card) {
attron(COLOR_PAIR(gettypecolor(cards_gettype(era, card))));
char array[40];
printw("%-23s", cards_getname(era, card, array));
- attrset(A_NORMAL);
+ //attrset(A_NORMAL);
+ turn_off_attributes();
printw(" #");
}
@@ -227,5 +236,6 @@ void io_printplain(int x, int y, char *s) {
void io_printcolor(int x, int y, int color, char *s) {
attron(COLOR_PAIR(color));
io_printplain(x, y, s);
- attrset(A_NORMAL);
+ //attrset(A_NORMAL);
+ turn_off_attributes();
}
bgstack15