menu.py 文件源码

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

项目:soyouhaveanidea 作者: yigitbey 项目源码 文件源码
def update(self):
        for index, item in enumerate(self.employees):
            mode = self.select_mode(index)

            try:
                if item.unlocked_age < 2:
                    mode = mode | curses.A_BOLD | curses.A_UNDERLINE
            except:
                pass

            if self.first_item_index > 0:
                self.window.addstr(0, 20, self.arrow_up)

            order = self.first_item_index + index + 1
            msg = self.item_message.format(order, item)
            self.window.addstr(1 + index, 1, msg, mode)

            if self.last_item_index < len(self.items):
                self.window.addstr(self.LIST_SIZE + 1, 20, self.arrow_down)

        self.window.refresh()
        curses.doupdate()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号