Lines Matching refs:curses
18 import curses
77 if curses.has_colors():
79 self.scr.attrset(curses.color_pair(random.randrange(1, 7)))
117 if curses.has_colors():
119 self.scr.attrset(curses.color_pair(
157 if curses.has_colors():
158 stdscr.attrset(curses.color_pair(1))
174 if curses.has_colors():
175 curses.init_pair(1, curses.COLOR_BLUE, 0)
176 curses.init_pair(2, curses.COLOR_CYAN, 0)
177 curses.init_pair(3, curses.COLOR_GREEN, 0)
178 curses.init_pair(4, curses.COLOR_MAGENTA, 0)
179 curses.init_pair(5, curses.COLOR_RED, 0)
180 curses.init_pair(6, curses.COLOR_YELLOW, 0)
181 curses.init_pair(7, curses.COLOR_WHITE, 0)
184 curses.mousemask(curses.BUTTON1_CLICKED)
235 elif c == curses.KEY_UP and ypos > 0:
237 elif c == curses.KEY_DOWN and ypos + 1 < board.Y:
239 elif c == curses.KEY_LEFT and xpos > 0:
241 elif c == curses.KEY_RIGHT and xpos + 1 < board.X:
243 elif c == curses.KEY_MOUSE:
244 mouse_id, mouse_x, mouse_y, mouse_z, button_state = curses.getmouse()
252 curses.flash()
262 curses.wrapper(main)