【发布时间】:2016-08-11 19:51:23
【问题描述】:
我有这样的代码:
width = 100
height = 50
gameDisplay.blit(button, (width, height))
pygame.display.update()
while True:
for event in pygame.event.get():
if event.type == pygame.MOUSEBUTTONUP and event.button == 1:
# replace the button's image with another
是否有任何功能或东西可以让我用另一个图像替换图像?
【问题讨论】:
-
使用一个全局的
image,然后根据需要重新设置该值,同时连续传输。
标签: python python-3.x pygame