📜  python pygame 屏幕示例 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:14.674000             🧑  作者: Mango

代码示例1
import pygame
background_colour = (255,255,255)
(width, height) = (300, 200)
screen = pygame.display.set_mode((width, height))
pygame.display.set_caption('Tutorial 1')
screen.fill(background_colour)
pygame.display.flip()
running = True
while running:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      running = False