[Python] 纯文本查看 复制代码 import sys
import pygame
pygame.init()
x = pygame.display.set_mode((400, 400))
pygame.display.set_caption("这里是标题")
c = pygame.font.SysFont("SimHei", 50)
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
x.fill('white')
text = c.render("海源无事打王者", True, 'grey', 'yellow')
x.blit(text, (20, 0))
text = c.render("带米去打王者了", True, 'grey', 'yellow')
x.blit(text, (20, 50))
text = c.render("米莱狄的机器人", True, 'grey', 'black')
x.blit(text, (20, 100))
text = c.render("米莱狄是它主人", True, 'grey', 'yellow')
x.blit(text, (20, 150))
text = c.render("米小队去打狂铁", True, 'blue', 'yellow')
x.blit(text, (20, 200))
text = c.render("团灭狂铁有大招", True, 'white', 'black')
x.blit(text, (20, 250))
pygame.display.update()
|