(win, title, info_lines, s, i, hscroll)
| 1785 | |
| 1786 | |
| 1787 | def _draw_input_dialog(win, title, info_lines, s, i, hscroll): |
| 1788 | edit_width = _width(win) - 4 |
| 1789 | |
| 1790 | win.erase() |
| 1791 | |
| 1792 | # Note: Perhaps having a separate window for the input field would be nicer |
| 1793 | visible_s = s[hscroll:hscroll + edit_width] |
| 1794 | _safe_addstr(win, 2, 2, visible_s + " "*(edit_width - len(visible_s)), |
| 1795 | _style["edit"]) |
| 1796 | |
| 1797 | for linenr, line in enumerate(info_lines): |
| 1798 | _safe_addstr(win, 4 + linenr, 2, line) |
| 1799 | |
| 1800 | # Draw the frame last so that it overwrites the body text for small windows |
| 1801 | _draw_frame(win, title) |
| 1802 | |
| 1803 | _safe_move(win, 2, 2 + i - hscroll) |
| 1804 | |
| 1805 | win.noutrefresh() |
| 1806 | |
| 1807 | |
| 1808 | def _load_dialog(): |
no test coverage detected