(win, y, text, attr=0)
| 155 | |
| 156 | |
| 157 | def centered_addstr(win, y, text, attr=0): |
| 158 | try: |
| 159 | h, w = win.getmaxyx() |
| 160 | x = max(0, (w - len(text)) // 2) |
| 161 | win.addstr(y, x, text, attr) |
| 162 | except Exception: |
| 163 | pass |
| 164 | |
| 165 | # --- curses UI components --- |
| 166 |
no outgoing calls
no test coverage detected