I'm trying to do a word game with Pygame and this is the code I developed for changing pages. But when pressed the pages only show for a second then disappear. I tried writing input() but it doesn't work. How can I fix this?
run = True
while run:
clock.tick(FPS)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
pressed = pygame.key.get_pressed()
if pressed[pygame.K_1]:
first_page()
if pressed[pygame.K_2]:
second_page()
if pressed[pygame.K_3]:
third_page()
if pressed[pygame.K_4]:
fourth_page()
intro()
pygame.display.update()
pygame.quit()