pygame.event.poll demo获取事件演示程序.py

"""
   pygame.event.poll demo获取事件演示程序.py
"""
import pygame
from pygame.locals import *

width,height = 480,360            # 设定分辨率
screen = pygame.display.set_mode((width,height))

running = True
while running:
    
    event = pygame.event.poll()   # 获取一个事件
    if event.type == QUIT:
        running = False
    

You must log in to read the rest of this article. Please log in or register as a user.