def init_color_pairs(self):
curses.init_pair(TOPSTATUS,TOPSTATUS_FG,TOPSTATUS_BG)
curses.init_pair(TOPSTATUS_ONLINE,curses.COLOR_GREEN,TOPSTATUS_BG)
curses.init_pair(TOPSTATUS_OFFLINE,curses.COLOR_RED,TOPSTATUS_BG)
# create some color pairs for voxel types in a hacky way
for item in dir(yateproto):
if item.startswith('YATE_VOXEL_'):
curses.init_pair(VOXEL_COLOR_PAIR + getattr(yateproto,item), curses.COLOR_WHITE,voxel_colors[getattr(yateproto,item)])
评论列表
文章目录