【发布时间】:2014-06-17 02:18:02
【问题描述】:
我知道如何在 pygame 中显示文本,但我真正需要的是能够在 pygame 窗口已经运行时编写文本。
这是我的 pygame 窗口代码:
import pygame
def highscore():
pygame.font.init()
background_colour = (255,255,255)
(width, height) = (600, 600)
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
highscore()
【问题讨论】:
-
Blitting text in pygame 的可能重复项
-
同一个问题已经有十几个问题了
-
@BartlomiejLewandowski 您链接的那个并不是真正的副本。也就是说,如果实际上没有几十个重复,我会感到震惊;你能链接一个吗?
标签: python python-2.7 pygame