- self.win.hline(mlines - 2, 0, 0, mcols)
-
- def help_init(self):
- """Display help screen"""
- (self.help_win, self.help_panel) = self.panel_create(20, 52)
- self.help_panel.top()
- self.help_panel.hide()
- self.help_win.clear()
- self.help_win.addstr(
- 1, 1, "LIGHTCARDS HELP", curses.color_pair(1) + curses.A_BOLD
- )
- self.help_win.hline(2, 1, curses.ACS_HLINE, 15)
- text = [
- "Welcome to lightcards. Here are some keybindings",
- "to get you started:",
- "",
- "h, left previous card",
- "l, right next card",
- "j, k, up, down flip card",
- "i, / star card",
- "0, ^, home go to the start of the deck",
- "$, end go to the end of the deck",
- "H, ? open this screen",
- "e open the input file in $EDITOR",
- "m open the control menu",
- "",
- "More information can be found in the man page, or",
- "by running `lightcards --help`.",
- "",
- "Press [q], [H], or [?] to go back.",
- ]
-
- for t in enumerate(text):
- self.help_win.addstr(t[0] + 3, 1, t[1])
-
- self.help_win.box()
-
- def disp_help(self):
- (mlines, mcols) = self.win.getmaxyx()
- self.help_win.mvwin(int(mlines / 2) - 10, int(mcols / 2) - 26)
- self.panel_up()
- self.help_panel.show()
- while True:
- key = self.help_win.getkey()
- if key in ["q", "H", "?"]:
- self.help_panel.hide()
- self.get_key()