-
-def textcolor(color):
- "Set the current text color"
- if game.options & OPTION_CURSES:
- if color == DEFAULT:
- curwnd.attrset(0)
- elif color == BLACK:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_BLACK))
- elif color == BLUE:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_BLUE))
- elif color == GREEN:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_GREEN))
- elif color == CYAN:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_CYAN))
- elif color == RED:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_RED))
- elif color == MAGENTA:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_MAGENTA))
- elif color == BROWN:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_YELLOW))
- elif color == LIGHTGRAY:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_WHITE))
- elif color == DARKGRAY:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_BLACK) | curses.A_BOLD)
- elif color == LIGHTBLUE:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_BLUE) | curses.A_BOLD)
- elif color == LIGHTGREEN:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_GREEN) | curses.A_BOLD)
- elif color == LIGHTCYAN:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_CYAN) | curses.A_BOLD)
- elif color == LIGHTRED:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_RED) | curses.A_BOLD)
- elif color == LIGHTMAGENTA:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_MAGENTA) | curses.A_BOLD)
- elif color == YELLOW:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_YELLOW) | curses.A_BOLD)
- elif color == WHITE:
- curwnd.attron(curses.COLOR_PAIR(curses.COLOR_WHITE) | curses.A_BOLD)
-