import pygame, sys pygame.init() screen = pygame.display.set_mode((800,800)) clock = pygame.time.Clock() dialogue_font = pygame.font.SysFont('arial', 100) dialogue = dialogue_font.render("Stefan is GAY", True, (0,10,10)) current_time = 0 button_press_time = 0 while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.QUIT() sys.exit() if event.type == pygame.KEYDOWN: button_press_time = pygame.time.get_ticks() screen.fill((255,255,255)) screen.blit(dialogue, (150,300)) current_time = pygame.time.get_ticks() if current_time - button_press_time > 1000: dialogue2 = dialogue_font.render("For me?", True, (0,10,10)) screen.blit(dialogue2, (150,400)) if current_time - button_press_time > 2000: screen.fill((0,0,0)) print(f"current time: {current_time} button press time: {button_press_time}") pygame.display.flip() clock.tick(60)