def _draw_footer(self, footer_window):
"""
Given a footer window and a list of items, draw the items in the footer and highlight the selected item.
Parameters:
footer_window (WindowObject): the window the footer will be drawn in
"""
for item in self.footer_items:
if self.footer_items.index(item) == self.current_column:
# Highlight the item that is currently selected
footer_window.addstr(1,
self.footer_items.index(item) * 10 + 1,
item,
curses.color_pair(1) | curses.A_BOLD)
else:
footer_window.addstr(1,
self.footer_items.index(item) * 10 + 1,
item)
评论列表
文章目录