Import Pygame
Import Pygame
menu_items = ["Option 1", "Option 2", "Option 3", "Quit"] # Set font and size
column_width = max_text_width + 10 # Initialize a list to store the positions of each text object
x = (i // items_per_column) * column_width
menu_loop = True
while menu_loop:
if event.type == pygame.QUIT:
menu_loop = False
mouse_pos = pygame.mouse.get_pos()
if i == len(menu_items) - 1:
menu_loop = False
else:
screen.fill((0, 0, 0))
screen.blit(item, position)
pygame.quit()