📜  显示 Surface 退出 - Python 代码示例

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

代码示例1
import pygame
running = True

while running:
  for event in pygame.event.get_pressed():
    if event.type == pygame.QUTI:
      running = False
      
  if not(running):
    pygame.quit()
    break #you got the error because you didn't completely close pygame so add
          #so add break after pygame.quit()