2
我想要刪除由PygButton創建的按鈕。我已經創造了它這樣:如何刪除pygbutton創建的按鈕
button1 = pygbutton.PygButton((50, 50, 60, 30), '1')
button2 = pygbutton.PygButton((120, 50, 60, 30), '2')
button3 = pygbutton.PygButton((190, 50, 60, 30), '3')
allButtons = (button1,button2,button3)
for b in allButtons:
b.draw(screen)
然而,一旦按鈕被點擊,我想清除屏幕上的按鈕和顯示屏幕上的東西。
我該怎麼做?