37,719
社区成员
发帖
与我相关
我的任务
分享
import pygame
pygame.font.init()
cur_font = pygame.font.SysFont("宋体",10)
pygame.init()
pygame.display.set_caption("标题")
scene = pygame.display.set_mode([500,500])
#-*-conding:utf-8-*-
import pygame
pygame.font.init()
cur_font = pygame.font.SysFont("宋体",10)
pygame.init()
pygame.display.set_caption("标题")
scene = pygame.display.set_mode([500,500])
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
希望能够帮助到你!import pygame
pygame.init()
screen=pygame.display.set_mode([800,600])
pygame.display.set_caption('黑板')
keep=True
YELLOW=(255,255,255)
radius=7
md=False
while keep:
for event in pygame.event.get():
if event.type==pygame.QUIT:
keep=False
if event.type==pygame.MOUSEBUTTONDOWN:
md=True
if event.type==pygame.MOUSEBUTTONUP:
md=False
if md:
spot=pygame.mouse.get_pos()
pygame.draw.circle(screen,YELLOW,spot,radius)
pygame.display.update()
pygame.quit()