menu.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:aws-ec2rescue-linux 作者: awslabs 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号