def init_pygame( self, native_width=480, native_height=272 ):
self.background_colour = ( 255,255,255 )
pygame.init()
display_info = pygame.display.Info()
w = display_info.current_w
h = display_info.current_h
self.window_size=(w,h)
if (w <= native_width) or (h <= native_height):
self.window = pygame.display.set_mode( self.window_size, pygame.FULLSCREEN )
else:
self.window = pygame.display.set_mode( (native_width, native_height) )
self.surface = pygame.display.get_surface()
pygame.mouse.set_visible( False )
self.clock = pygame.time.Clock()
评论列表
文章目录