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()
评论列表
文章目录