1
我想添加一个图像作为pygame gui中按钮的背景。我有现在创建的按钮,我只需要添加图像。我如何将图像添加到按钮?如何添加背景图片到pygame gui中的按钮?
这是我的代码
game1 = pygame.Rect(150 , 100, 200, 150) # creates a rect object
pygame.draw.rect(screen, [255, 100, 0], game1) # draw objects down here
它工作正常
你能帮我一个忙,给我看一个代码示例吗?@Larry –
不要忘了命名你的按钮图像'button_img' https://pastebin.com/DFmKLp0s –
非常感谢你,帮助批量 –