MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / display_menu

Function display_menu

tools/python-3.11.9-amd64/Tools/demo/life.py:152–163  ·  view source on GitHub ↗

Display the menu of possible keystroke commands

(stdscr, menu_y)

Source from the content-addressed store, hash-verified

150
151
152def display_menu(stdscr, menu_y):
153 "Display the menu of possible keystroke commands"
154 erase_menu(stdscr, menu_y)
155
156 # If color, then light the menu up :-)
157 if curses.has_colors():
158 stdscr.attrset(curses.color_pair(1))
159 stdscr.addstr(menu_y, 4,
160 'Use the cursor keys to move, and space or Enter to toggle a cell.')
161 stdscr.addstr(menu_y + 1, 4,
162 'E)rase the board, R)andom fill, S)tep once or C)ontinuously, Q)uit')
163 stdscr.attrset(0)
164
165
166def keyloop(stdscr):

Callers 1

keyloopFunction · 0.85

Calls 1

erase_menuFunction · 0.85

Tested by

no test coverage detected