def __init__(self, discord_client):
self.discord = discord_client
self.tabs = {}
self.w_tabs = TabSelector(self)
self.frame = urwid.Frame(
urwid.Filler(
urwid.Text(
"????????????????????????????????????\n"
"????????????????????????????????????\n"
"????????????????????????????????????\n"
" v0.2.4\n"
" \n"
" \n"
" < Logging in... Hang tight! > \n"
" --------------------------- \n"
" \ ^__^ \n"
" \ (oo)\_______ \n"
" (__)\ )\/\ \n"
" ||----w | \n"
" || || \n"
" \n"
" \n"
" \n",
align=urwid.CENTER)),
header=self.w_tabs)
HasModal.__init__(self, self.frame)
self.urwid_loop = urwid.MainLoop(
self.w_placeholder,
palette=MainUI.palette,
unhandled_input=lambda key: self._keypress(None, key),
event_loop=urwid.AsyncioEventLoop(loop=self.discord.loop),
pop_ups=True)
def refresh(_loop, _data):
_loop.draw_screen()
_loop.set_alarm_in(2, refresh)
self.urwid_loop.set_alarm_in(0.2, refresh)
self.urwid_loop.start()
评论列表
文章目录