def __init__(self):
wx.Frame.__init__(self, parent=None, id=wx.ID_ANY,
title='Janet', size=(WIDTH, HEIGHT))
self.SetMinSize((WIDTH, HEIGHT))
self.browser = None
global g_count_windows
g_count_windows += 1
self.setup_icon()
# self.create_menu()
self.Bind(wx.EVT_CLOSE, self.OnClose)
# Set wx.WANTS_CHARS style for the keyboard to work.
# This style also needs to be set for all parent controls.
self.browser_panel = wx.Panel(self, style=wx.WANTS_CHARS)
self.browser_panel.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
self.browser_panel.Bind(wx.EVT_SIZE, self.OnSize)
# On Linux must show before embedding browser, so that handle
# is available.
if LINUX:
self.Show()
self.embed_browser()
else:
self.embed_browser()
self.Show()
wx.CallLater(500, self.setup_gamepad) # this has to be delayed to make sure the DOM has loaded the list of games
评论列表
文章目录