I'm trying to make a simulation, and it needs 3 inputs from the user. The inputs I need are the X and Y dimensions for the display and a number of iterations.
def max_rows():
   while True:
       for event in pygame.event.get():
           if event.type==pygame.QUIT:
               pygame.quit()
               sys.exit()
           if event.type==pygame.KEYDOWN:
               if event.key==pygame.K_RETURN:
                   xmax=user_text
               if event.key==pygame.K_BACKSPACE:
                   user_text=user_text[:-1]
               else:
                   user_text+=event.unicode
       screen.fill((0,0,0))
       pygame.draw.rect(screen,color,input_rect,2)
       text_surface=base_font.render(user_text,True,(255,255,255))
       screen.blit(text_surface,(input_rect.x+5,input_rect.y+5))
       input_rect.w=max(100,text_surface.get_width()+10)
       pygame.display.flip()
I can get the input from the user, but I'm not sure how to use it or how to get the next inputs.
 
     
    