def show_notification_state(self, uuid_store):
self.notification_count += 1
col = curses.color_pair(3)
self.window.addstr(self.screen_height - 1, 30, str(self.notification_count), col)
key_list = UuidStoreKeys.get_key_and_setting()
y = 3
col = curses.color_pair(3)
for k in key_list:
if k[1] is True:
self.window.addstr(1 + y, 1, "{0}".format(k[0]), col)
y += 1
columns = len(uuid_store.uuid)
self.window.addstr(0, 50, "columns = {0}".format(columns), col)
x = 1
xw = 30
current_time = time.time()
for dummy, item in uuid_store.uuid.items():
self.window.addstr(1, x*xw, "{0}".format(item.rf_type))
self.window.addstr(2, x*xw, "{0}".format(item.name))
y = 3
for k in key_list:
if k[1] is True:
self.window.addstr(1 + y, x * xw, "-" * (xw - 1), curses.color_pair(3))
if k[0] in item.itemMap:
deltatime = current_time - item.itemMap[k[0]].timeChanged
if deltatime > 5:
col = curses.color_pair(3)
else:
col = curses.color_pair(4)
self.window.addstr(1+y, x*xw, "{0}".format(item.itemMap[k[0]].value), col)
y += 1
x += 1
self.window.move(1, 1)
self.window.refresh()
评论列表
文章目录