From e52231e8a148f325bc4e14d17db4ec43599e61a7 Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Mon, 1 Feb 2021 22:42:10 -0500 Subject: use default colors instead of white-on-black --- roku-cli.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'roku-cli.py') diff --git a/roku-cli.py b/roku-cli.py index ea9ccdd..b448dcc 100755 --- a/roku-cli.py +++ b/roku-cli.py @@ -76,7 +76,11 @@ def draw_rect_key(stdscr, y, x, text, colors): stdscr.addstr(y + 2, x, owf.format('-' * iw)) # draw the inside - stdscr.addstr(y + 1, x + 1, iwf.format(text), curses.color_pair(colors)) + if colors == 1: + stdscr.addstr(y + 1, x + 1, iwf.format(text)) + elif colors == 2: + stdscr.addstr(y + 1, x + 1, iwf.format(text), curses.A_STANDOUT) + def status(stdscr): stdscr.addstr(20, 1, "~*~ roku-cli ~*~") @@ -139,8 +143,7 @@ def main(stdscr, ip): def init_curses(): # set up colors - curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLACK) - curses.init_pair(2, curses.COLOR_BLACK, curses.COLOR_WHITE) + curses.use_default_colors() # clear the screen and hide the cursor curses.curs_set(False) -- cgit v1.2.3