r/PythonLearning • u/TheCarFamily • 25d ago
Help Request Not picking up input?
either that, im using the wrong dialect, or somn just doesnt work, i am trying to have an image change when T is pressed (unload old image when pressed and when not pressed load old image)
also using pygame, the first image loads, but nothing changes when T is pressed, yes i have also tested with print("")
any help would be nice!
11
Upvotes
View all comments
2
u/MarkoDahl54 25d ago
You need to use pygame.key.get_pressed() in your main loop and update the display with pygame.display.flip() after changing the image. Make sure your image blit happens before the display update.